2
$\begingroup$

Starting with $|0\rangle$, I would like to understand how the probability values of 85.4% $|0\rangle$ and 14.6% $|1\rangle$ are derived from the payload circuit below?

Circuit

After applying the 45 degree phase gate, I get:

afterphase

And after applying the second Hadamard, I get the original $|0\rangle$ value. I am interested in the specific math operations involved in the matrix multiplications.

$\endgroup$

1 Answer 1

1
$\begingroup$

You can obtain the effect of this sequence of gates as the matrix product:

$$H T H |0\rangle = \frac{1}{\sqrt2} \begin{bmatrix} 1 & 1 \\ 1 & -1\end{bmatrix} \begin{bmatrix} 1 & 0 \\ 0 & e^{i\pi/4}\end{bmatrix} \frac{1}{\sqrt2} \begin{bmatrix} 1 & 1 \\ 1 & -1\end{bmatrix} \begin{bmatrix} 1 \\ 0\end{bmatrix}$$

Alternatively, if you prefer Dirac notation you can apply the gates to the $|0\rangle$ state in order:

$$|0\rangle \xrightarrow{\text{H}} \frac{1}{\sqrt2}(|0\rangle + |1\rangle) \xrightarrow{\text{T}} \frac{1}{\sqrt2}(|0\rangle + e^{i\pi/4} |1\rangle) \xrightarrow{\text{H}} \frac{1}{2}\big(|0\rangle + |1\rangle + e^{i\pi/4} (|0\rangle - |1\rangle)\big) = \frac{1}{2}\big( 1 + e^{i\pi/4} \big)|0\rangle + \frac{1}{2}\big( 1 - e^{i\pi/4} \big)|0\rangle$$

To get the probabilities of measuring 0 and 1 in this state, you have to simplify the amplitudes further using the fact that $e^{i\pi/4} = \frac{1 + i}{\sqrt2}$:

$$P(0) = \frac{|1 + e^{i\pi/4}|^2}{|1 + e^{i\pi/4}|^2 + |1 - e^{i\pi/4}|^2} = \frac{2 + \sqrt2}{(2 + \sqrt2) + (2 - \sqrt2)} = \frac{2+\sqrt2}{4} \approx 0.8536$$

$\endgroup$

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.