I have tried to solve this problem many times. But I can't solve this. Please somebody help me.

quantum circuit

(prep has no meaning)

${O_1}$ : enter image description here $O_2$:enter image description here

  1. What is the state vector $|\psi\rangle$ (for qubits 1 and 2) after measuring $ O_1 $, the observable $X\otimes X$ (at the 2nd barrier)? Assume the outcome of the measurement is 0.
  2. Assume the measurement is 1. what is the state vector?
  3. What is the state vector $|\psi\rangle$ (for qubits 1 and 2) after measuring $O_2$, the observable $Z\otimes Z$ (at the 4th barrier)?

1 Answer 1


After the first Hadamard gate you have the state $\frac{1}{\sqrt{2}}(|000\rangle+|100\rangle)$ (qubit zero being the leftmost). After the controlled $O_1$ gate, you get $\frac{1}{\sqrt{2}}(|000\rangle+|111\rangle)$. And the next Hadamard leaves you with:

$$ \begin{align} |\psi\rangle &= \frac{1}{\sqrt{2}}\left(\frac{1}{\sqrt{2}}(|000\rangle+|100\rangle)+\frac{1}{\sqrt{2}}(|011\rangle-|111\rangle)\right) \\ &= \frac{1}{2}(|000\rangle+|100\rangle+|011\rangle-|111\rangle). \end{align} $$

Now, for the measurement part, I assume you refer to the measurement depicted in the circuit you added to your question, as the measurement observable $X \otimes X$ has eigenvalues $+1, -1$, not $0$. Thus, if qubit zero is measured to be in the $|0\rangle$ state, that leaves $|\psi\rangle=\frac{1}{\sqrt{2}}(|000\rangle+|011\rangle)$. If it's measured to be in $|1\rangle$, the resulting state is $|\psi\rangle = \frac{1}{\sqrt{2}}(|100\rangle-|111\rangle)$. To get the state of qubits one and two, you can simply factor out qubit zero from the two previous expressions.

The operations after the second barrier would bring both cases back to $|\psi\rangle=\frac{1}{\sqrt{2}}(|000\rangle+|011\rangle)$ (check this by reseting qubit zero to $|0\rangle$ and applying $Z$ to the last qubit in the case that the measurement outcome was $|1\rangle$). Then, you can apply the gates in a similar fashion as above for the last question.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.