Measuring in Different Bases - Deterministic versus Random outcomes

174 Views Asked by At

The Qiskit Textbook on https://qiskit.org/textbook/ch-states/single-qubit-gates.html in section 4: Digression: Measuring in Different Bases, says –

Z-basis is not intrinsically special, and that there are infinitely many other bases. Similarly with measurement, we don’t always have to measure in the computational basis (the Z-basis), we can measure our qubits in any basis.

To describe this – It says Let’s

try measuring in the X-basis. We can calculate the probability of measuring either |+⟩ or |−⟩.

Then it suggests passing the qubit through Hadamard gate for its X-basis measurement.

qc.h(qubit)   # for X-basis measurement, you pass the qubit through Hadamard gate.
And makes statements like -

There is another way to see why the Hadamard gate indeed takes us from the Z-basis to the X-basis.

We have created an X-measurement by transforming from the X-basis to the Z-basis before our measurement.

We initialized our qubit in the state |−⟩, but we can see that, after the measurement, we have collapsed our qubit to the state |1⟩If you run the cell again, you will see the same result, since along the X-basis, the state |−⟩ is a basis state and measuring it along X will always yield the same result.

Then it goes on to make the following statements -

Measuring in different bases allows us to see Heisenberg’s famous uncertainty principle in action. Having certainty of measuring a state in the Z-basis removes all certainty of measuring a specific state in the X-basis, and vice versa. A common misconception is that the uncertainty is due to the limits in our equipment, but here we can see the uncertainty is actually part of the nature of the qubit.

For example, if we put our qubit in the state |0⟩ our measurement in the Z-basis is certain to be |0⟩, but our measurement in the X-basis is completely random! Similarly, if we put our qubit in the state |−⟩, our measurement in the X-basis is certain to be |−⟩, but now any measurement in the Z-basis will be completely random.

More generally: Whatever state our quantum system is in, there is always a measurement that has a deterministic outcome.

Questions:
1.How can we say this is true of all quantum states and gates – "Whatever state our quantum system is in, there is always a measurement that has a deterministic outcome.” Can someone explain this with more concrete examples?
2. When would an outcome be deterministic versus random?
3. And if we know that the deterministic outcome in a particular basis is let’s say ‘G’, then why can’t it be just transformed into another basis mathematically (on paper) to find what the answer is in that other basis – meaning how will it be random in that other basis, since it is just a mathematical transformation of the deterministic answer in the original basis?


Cross-posted on qc.SE

1

There are 1 best solutions below

0
On

Before answering your question let me quickly recap the simplest formulation of "measurement" in quantum mechanics:

Assuming our system is finite-dimensional (e.g., qubits) a von Neumann measurement of a system is described by a Hermitian matrix $A$. This has the advantage that the expectation value of the measurement ($=\langle\psi|A|\psi\rangle$ for pure states, and ${\rm tr}(\rho A)$ for general mixed states $\rho$) is a real number, and that $A$ can be decomposed via its spectrum: there exist real numbers $a_j$ and an orthonormal basis $\{|j'\rangle\}$ such that $A=\sum_j a_j|j'\rangle\langle j'|$. Equivalently the following holds:

Spectral Decomposition. Given $A\in\mathbb C^{n\times n}$ Hermitian, for all eigenvalues $a\in\sigma(A)$ ($\sigma(\cdot)$ being the spectrum) there exists a unique Hermitian matrix $\Pi_a\in\mathbb C^{n\times n}$ which satisfies $\Pi_a^2=\Pi_a$ as well as $A\Pi_a=a\Pi_a$---indeed $\Pi_a$ is the orthogonal projection onto the eigenspace $V_a=\{|v\rangle\,:\,A|v\rangle=a|v\rangle\}$. Moreover, these $\Pi_a$ satisfy $$ \Pi_a\Pi_{\tilde a}=\delta_{a,\tilde a},\qquad\sum_{a\in\sigma(A)}\Pi_a={\bf 1},\text{ and }\qquad A=\sum_{a\in\sigma(A)}a\Pi_a\,. $$

In this formalism the possible measurement outcomes are the eigenvalues $a$ of $A$, and they are measured with probability ${\rm tr}(\rho\Pi_a)$. As an example measuring the spin $Z$-component of a qubit is described by the Pauli-$Z$ matrix $$ \begin{pmatrix}1&0\\0&-1\end{pmatrix}=1\underbrace{\begin{pmatrix}1&0\\0&0\end{pmatrix}}_{=\Pi_1}+(-1)\underbrace{\begin{pmatrix}0&0\\0&-1\end{pmatrix}}_{=\Pi_{-1}}\,. $$ Therefore if the system is in some general mixed state $\rho$, then

  • with probability ${\rm tr}(\rho\Pi_1)=\langle 0|\rho|0\rangle$ a $Z$-measurement gives value $+1$ ("up") and the system is in the eigenstate $|0\rangle$ afterwards.
  • with probability ${\rm tr}(\rho\Pi_{-1})=\langle 1|\rho|1\rangle$ a $Z$-measurement gives value $-1$ ("down") and the system is in the eigenstate $|1\rangle$ afterwards.

With this in mind let us tackle your questions!

  1. "When would an outcome be deterministic versus random?"

A measurement is deterministic if there exists some value which is measured with probability one, and "completely random" if all measurement outcomes have the same probability. This is what the Qiskit textbook is trying to convey: if the system is in state $|0\rangle$ and we measure the spin in $Z$-direction then the probability of measuring spin "up" is $|\langle 0|0\rangle|^2=1=100\%$ and the system is in state $|0\rangle$ after the measurement. On the contrary, measuring the spin in $X$-direction is desribed by the Pauli-$X$ matrix $$ \begin{pmatrix}0&1\\1&0\end{pmatrix}=1\begin{pmatrix}\frac12&\frac12\\\frac12&\frac12\end{pmatrix}+(-1)\begin{pmatrix}\frac12&-\frac12\\-\frac12&\frac12\end{pmatrix}\,; $$ thus if the system is again in state $|0\rangle$, measuring $+1$ has probability $\langle 0|\Pi_1|0\rangle=\frac12$, just like measuring $-1$. As all possible measurement outcomes have equal probability it is reasonable to say that the outcome in this scenario is "completely random".

  1. "Whatever state our quantum system is in, there is always a measurement that has a deterministic outcome."

For simplicity let us assume that our system is in a pure state $|\psi\rangle$ (but the following also holds for general mixed states via the spectral decomposition). Then we can construct a complete set of orthonormal projectors---i.e. a collection $\{\Pi_a\}_a$ with all the properties from the spectral decomposition above---via $\{|\psi\rangle\langle\psi|,{\bf 1}-|\psi\rangle\langle\psi|\}$. In particular every measurement operator which decomposes in this way, that is, $$ A=a_1|\psi\rangle\langle\psi|+a_2({\bf 1}-|\psi\rangle\langle\psi|) $$ for any $a_1,a_2\in\mathbb R$ will produce the measurement outcome $a_1$ with certainty: \begin{align*} \langle\psi|(|\psi\rangle\langle\psi|)|\psi\rangle =\langle\psi|\psi\rangle^2=1^2=1\,. \end{align*} For example the state $|0\rangle$ will produce a deterministic outcome if and only if the measurement is of the form $$ A=a_1|0\rangle\langle0|+a_2({\bf 1}-|0\rangle\langle0|)=\begin{pmatrix}a_1&0\\0&0 \end{pmatrix}+\begin{pmatrix} 0&0\\0&a_2 \end{pmatrix}=\begin{pmatrix}a_1&0\\0&a_2\end{pmatrix} $$ which in particular includes the $Z$-measurement, but not the $X$-measurement.

  1. Why can one not transform a deterministic outcome into another basis to get rid of the randomness of the other measurement?

The point is precisely that -- although, for example, $X$ can be transformed into $Z$ via a unitary matrix -- the measurement is different because the measurement projectors $\Pi_a$ are different. This is also exemplified by the observation that measuring $Z$ of the state $|0\rangle$ is deterministic, but measuring $X$ here makes for a random outcome. Indeed, transforming the measurement basis without changing the measurement probabilities is only possible if the state is "rotated simultaneously": mathematically $$ {\rm tr}(\rho(U\Pi_aU^\dagger))={\rm tr}((U^\dagger\rho U)\Pi_a)\neq{\rm tr}(\rho\Pi_a)\text{ in general} $$ (because the trace is cyclic). However, $$ \text{Probability of measuring }a={\rm tr}(\rho \Pi_a)={\rm tr}(UU^\dagger \rho UU^\dagger \Pi_a)={\rm tr}\big((U^\dagger\rho U)(U^\dagger\Pi_a U)\big) $$ where the last expression is the probability of measuring $a$ w.r.t. the measurement operator $U^\dagger AU$ if the system is in state $U^\dagger\rho U$.