$x$ and $z$ are just numbers $0$ or $1$, so $X^x = I$ or $X$, and $Z^z = I$ or $Z$.

The explanatiton goes as follows

- The first step is to note that in our case CNOT operation on the 1st and 2nd qubits has the same effect as CNOT on the 1st and 3rd qubits. That is

$$

CNOT_{12} |psirangle(|00rangle+|11rangle)frac{1}{sqrt{2}} = CNOT_{13} |psirangle(|00rangle+|11rangle)frac{1}{sqrt{2}}

$$

To see why, just define $|psirangle = alpha|0rangle + beta|1rangle$ and compute

$$

CNOT_{12} |psirangle(|00rangle+|11rangle)frac{1}{sqrt{2}} = CNOT_{12}(alpha|0rangle + beta|1rangle)(|00rangle+|11rangle)frac{1}{sqrt{2}} =

$$

$$

=CNOT_{12}(alpha|000rangle + alpha|011rangle + beta|100rangle + beta|111rangle )frac{1}{sqrt{2}} =

$$

$$

= (alpha|000rangle + alpha|011rangle + beta|110rangle + beta|101rangle )frac{1}{sqrt{2}},

$$

$$

CNOT_{13} |psirangle(|00rangle+|11rangle)frac{1}{sqrt{2}} = CNOT_{13}(alpha|000rangle + alpha|011rangle + beta|100rangle + beta|111rangle )frac{1}{sqrt{2}} =

$$

$$

=(alpha|000rangle + alpha|011rangle + beta|101rangle + beta|110rangle )frac{1}{sqrt{2}}

$$

So, we can transform the circuit by switching $CNOT_{12}$ to $CNOT_{13}$.

- In the second step we note that in our new circuit the second qubit has only one operation that affects it â the measurement. So we can apply it before all other operations. The result of this operation is $x=0$ or $1$, and 2nd and 3rd qubits after this measurement will be $|xxrangle = |00rangle$ or $|11rangle$.

- Since the 3rd qubit is $|0rangle$ or $|1rangle$ at this step, we can swap the order of operations $CNOT_{13}$ and $X^x$ on it. But $X^x|xrangle = |0rangle$, so what is left is to analyze the circuit
- At this step you can directly compute the effect of the CNOT and H gates

$$

Hotimes I cdot CNOT_{12} cdot |psirangle|0rangle = Hotimes I cdot CNOT_{12} cdot (alpha|00rangle + beta|10rangle) =

$$

$$

= Hotimes I (alpha|00rangle + beta|11rangle) = frac{1}{sqrt{2}}left( alpha(|0rangle+|1rangle)|0rangle + beta(|0rangle-|1rangle)|1rangle right) =

$$

$$

= frac{1}{sqrt{2}}left( alpha|00rangle+alpha|10rangle + beta|01rangle-beta|11rangle right) = frac{1}{sqrt{2}}left( |0rangle(alpha|0rangle+beta|1rangle) + |1rangle(alpha|0rangle-beta|1rangle) right)

$$ - Now if we measure 1st qubit the result will be $z=0$ or $1$, and the state will be $|0rangle(alpha|0rangle+beta|1rangle)$ or $|1rangle(alpha|0rangle-beta|1rangle)$ correspondingly. So if we apply $Z^z$ on the last qubit it will be in the state $alpha|0rangle+beta|1rangle = |psirangle$

**Update**

His second way to prove last circuit (from step 3) is basically by using equality

$$

alpha|00rangle+beta|11rangle = frac{1}{sqrt{2}}(|+rangle(alpha|0rangle + beta|1rangle) + |-rangle(alpha|0rangle – beta|1rangle))

$$

After applying $CNOT$ on $|psirangle|0rangle$ we will get the state $alpha|00rangle+beta|11rangle$. Now instead of applying $H$ and measuring the 1st qubit in $|0rangle, |1rangle$ basis we can measure in $|+rangle, |-rangle$ basis right away. The result will be $z=0$ with the state $|+rangle(alpha|0rangle + beta|1rangle)$ or $z=1$ with the state $|-rangle(alpha|0rangle – beta|1rangle)$. So $Z^z$ corrects the state of the last qubit.

This is a syndicated post. Read the original post at Source link .