A parameterized gate changes its transformation according to one or more classical parameter values. For real-amplitude state preparation, Ry(θ) provides the needed flexibility where fixed gates such as X, Z, and H do not. section 2.1.1
For Ry(θ) applied to |0⟩:
- Ry(θ)|0⟩ = cos(θ/2)|0⟩ + sin(θ/2)|1⟩. section 2.1.1
- Preparing α|0⟩ + β|1⟩ requires cos(θ/2) = α and sin(θ/2) = β. section 2.1.1
- The states |0⟩, |1⟩, |+⟩, and |−⟩ use parameters 0, π, π/2, and −π/2, respectively. section 2.1.1
Table 2.1 Commonly used single-qubit gates with real coefficients and their effects on an arbitrary state
| Gate | Matrix representation | The result of applying the gate to \(\ket{\psi} = \gamma \ket{0} + \delta \ket{1}\) |
|---|---|---|
| \(I\) | \(\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\) | \(I\ket{\psi} = \gamma \ket{0} + \delta \ket{1}\) |
| \(X\) | \(\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\) | \(X\ket{\psi} = \delta \ket{0} + \gamma \ket{1}\) |
| \(Z\) | \(\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}\) | \(Z\ket{\psi} = \gamma \ket{0} - \delta \ket{1}\) |
| \(H\) | \(\frac1{\sqrt2}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}\) | \(H\ket{\psi} = \frac1{\sqrt2} (\gamma + \delta) \ket{0} + \frac1{\sqrt2} (\gamma - \delta) \ket{1}\) |
| \(Ry(\theta)\) | \(\begin{pmatrix} \cos \frac{\theta}{2} & -\sin \frac{\theta}{2} \\ \sin \frac{\theta}{2} & \cos \frac{\theta}{2} \end{pmatrix}\) | \(Ry(\theta)\ket{\psi} = (\gamma \cos \frac{\theta}{2} - \delta \sin \frac{\theta}{2}) \ket{0} + (\gamma \sin \frac{\theta}{2} + \delta \cos \frac{\theta}{2}) \ket{1}\) |
Compare matrix representations and effects of common single-qubit gates, including Ry(θ), on arbitrary states. section 2.1.1
Choosing the angle
Given real amplitudes α and β, solve for an angle whose cosine and sine match them; atan2 preserves the signs of both quantities. section 2.1.1
