Gate application transforms a quantum state by multiplying its state vector by the gate’s matrix. For X acting on γ|0⟩ + δ|1⟩, the amplitudes swap, producing δ|0⟩ + γ|1⟩. section 2.1.1
Choose the operation by matching the required state transformation:
- Use fixed gates such as I, X, Z, or H for standard transformations of single-qubit states. section 2.1.1
- Use the parameterized rotation Ry(θ) when the desired transformation depends on state amplitudes or another parameter. section 2.1.1
- Express gate application abstractly in quantum programming tools, leaving later software layers to decompose operations for hardware. section 1.3.3
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 common single-qubit gates through their matrices and their effects on an arbitrary state. section 2.1.1
