Optimal quantum state discrimination via nested binary measurements