Can anyone help me understanding what is this circuit doing ?

enter image description here

The circuit can be reproduced with qiskitas follows:

qc = QuantumCircuit(3,3)





From my understanding, The proposed circuit is fed with the following quantum state $\Psi = |000\rangle$. We first apply Hadamard on the first qubit, getting \begin{align*} \Psi \to \underbrace{\cfrac{1}{\sqrt2} \ (|000\rangle + |100\rangle) }_{\Psi_1} \end{align*}

then the states goes through a CNOT on the second and third qubit controlled on the first one, which produces \begin{align*} \Psi_1 \to \cfrac{1}{\sqrt2} \ (|000\rangle + |111\rangle) \end{align*}

Which is the GHZ entangled state.

The $S^t$ gate is represented by the following matrix \begin{align*} \mathcal{S}^t = \left[ {\begin{array}{cc} 1 & 0 \\ 0 & -i \\ \end{array} } \right] \end{align*}

and since

\begin{align} \mathcal{S}^t |0\rangle = |0 \rangle \\ \mathcal{S}^t |1\rangle = -i |1\rangle \end{align}

after the $\mathcal{S}^t$ plus $\mathcal{H}$ cascade on the second and third qubit and the $\mathcal{H}$ on the first qubit, we end up with the following final state before the measurement \begin{align*} \Phi = \cfrac{1}{2} \ (|001\rangle + |010\rangle + |100\rangle + |111\rangle) \end{align*}

I don't know if my calculations are correct. Anyway I don't get what is this circuit doing. Please notice that I'm not a physicist then my knowledge is limited to the field of Qcomputing.


2 Answers 2


The first part of the circuit

enter image description here

is to create a GHZ state

$$|\psi\rangle = \dfrac{|000\rangle + |111\rangle}{\sqrt{2}} $$

The second part of the circuit is to change the basis of measurement to $XYY$. That is you measure the first qubit in the $X$ basis, and second and third qubit in the $Y$ basis. To see this, first let's us look at the first qubit and note the idenity $$ HZH = X$$ Therefore, $$\langle \psi | X | \psi \rangle = \langle \psi | HZH | \psi \rangle = \langle \psi H | Z | H\psi \rangle $$

hence the reason for the Hadamard gate before the measurement in the $Z$ basis.

Similarly, for the second and third qubits, recall the identity $$(SH)Z(HS^\dagger) = Y $$ and therefore $$\langle \psi |Y| \psi \rangle = \langle \psi | (SH)Z (HS^\dagger) | \psi \rangle = \langle \psi SH | Z | H S^\dagger \psi \rangle $$

Thus, here you want to apply $S^\dagger$ follow by the Hadamard gate $H$ before measurement.

Put all of this together, you get the circuit you have in question:

enter image description here


This looks like one case of a GHZ bell test. It's preparing a GHZ state and then measuring the qubits in the X, Y, and Y bases respectively.

In the full experiment the three players prepare the state and are then simultaneously told to measure their qubits in either the XXX, XYY, YXY, or YYX bases without being given time to communicate. The interesting thing is the various results predicted by quantum mechanics are provably impossible to reproduce using local classical strategies.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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