Reputation: 35
According to the Q# documentation, a single qubit can be measured by M.The method uses Pauli-Z. But why Pauli Z can be used to measure a single qubit? I have known the matrix of Pauli-Z like below:
and the output result is given by the distribution:
But what's the relationship between the matrix and the formula? What's happened with method M? I really need your help.
Upvotes: 1
Views: 1604
Reputation: 2032
Pauli Z matrix defines the basis in which the measurement is performed. A measurement in the Pauli Z basis is the same as the computational basis measurement, projecting the state onto one of the states |0⟩ or |1⟩ (the eigenstates of Pauli Z matrix).
I'm not up for spelling the math here, since classical StackOverflow doesn't support LaTeX. You can find a good tutorial on single-qubit measurements in Q# in the Quantum Katas project.
Upvotes: 1