Home | Algorithms | Commercialization | Data Science | Information Theories | Quantum Theories | Lab | Linear Algebra |
<< KRT Universal Quantum Gates | QASM U Gates >> |
$\require{cancel} \newcommand{\Ket}[1]{\left|{#1}\right\rangle} \newcommand{\Bra}[1]{\left\langle{#1}\right|} \newcommand{\Braket}[1]{\left\langle{#1}\right\rangle} \newcommand{\Rsr}[1]{\frac{1}{\sqrt{#1}}} \newcommand{\RSR}[1]{1/\sqrt{#1}} \newcommand{\Verti}{\rvert} \newcommand{\HAT}[1]{\hat{\,#1~}} \DeclareMathOperator{\Tr}{Tr}$
First created in July 2018
To measure a state vector $\Ket\psi$ along an arbitrary vector $\Ket k$ is to project $\Ket\psi$ onto $\Ket k$ in Hilbert Space. In other words, it is to "collapse" $\Ket\psi$ onto $\Ket k$ and find the amplitude (through probability). That said, the standard measurement of a quantum computer is on $\Ket 0$, so there is a need to align $\Ket k$ to $\Ket 0$ before the measurement.
By rotating $\Ket k$ to $+Z$ and measure the probability of $\Ket0$, you will have the result of $p=\cos^2(\theta/2)$, where $\theta$ is the angle from $+Z$ on the Bloch sphere. That means $\sqrt p=\cos(\theta/2)$ is the amplitude of the measurement, and $\theta/2$ is the projection angle in Hilbert Space.
If all you are interested in is the amplitude of $\Ket\psi$ on $\Ket k$, then $\sqrt p$ is the answer.
There are occasions that you do want the projection angle in the Bloch sphere (e.g. the phase on the $X-Y$ plane). What you will be interested in is in fact $\theta$.
Given $\cos\theta=2\cos^2(\theta/2)-1=2p-1,$ we have $\theta=\cos^{-1}(2p-1).$ That said, the range of $\cos^{-1}$ is $[0,\pi]$. If you want to determine the sign of the phase, you will need to have one more projection.
For example, to measure the phase of $\Ket\psi$ is to measure the angle between $+X$ and the shadow of $\Ket\psi$ on the $X-Y$ plane.
To align $+X$ with $+Z$, you apply the Hadamard gate, then measure the probability $p$ of $H\Ket\psi$ on $+Z$. The phase angle is determined by $\theta=\cos^{-1}(2p-1).$
To determine the sign of the phase, you can align $+Y$ with $+Z$ and measure again for $p'$, the probability of $HS^\dagger\Ket\psi$ on $+Z$ to obtain $\theta'=\cos^{-1}(2p'-1).$ The signs of $2p-1$ and $2p'-1$ determine the quadrant of the phase angle on the $X-Y$ plane.
Let $\Ket\psi=\Rsr2(\Ket0+i\Ket1),$ i.e. a phase angle of $\pi/4$. $H\Ket\psi$ would measure $p=0.854$, an angle of $\pi/4$ with $+Z$. That said, it is also true if $\Ket{\psi'}=\Rsr2(\Ket0-i\Ket1)$ with a phase angle of $-\pi/4$.
Now let us measure $HS^\dagger\Ket\psi$ and obtain $p=0.854$, an angle of $\pi/4$ with $+Z$ also, but $HS^\dagger\Ket{\psi'}$ would give you $p'=0.146$, an angle of $3\pi/4$ with $+Z$. $\big(\text{Note: }\cos^{-1}(2p'-1)=3\pi/4.\big)$
In short, the sign of $2p-1$ tells if it is $+X$ or $-X$, and that of $2p'-1$ tells $+Y$ from $-Y$.
In the above example, $\Ket\psi$ will have $(+,+)$ and $\Ket{\psi'}~~(+,-).$
<< KRT Universal Quantum Gates | Top | QASM U Gates >> |