You are reading without signing in. Sign in or continue as guest to take quizzes and keep XP.
Phase and rotation gates
S, T, P and the RX/RY/RZ family: fine control of a qubit, and why T matters.
- Relate S, T and P(λ) to RZ.
- Pick the rotation gate that prepares a given single-qubit state.
- Explain 'universal gate set' in one sentence.
Rotations let you place a qubit anywhere on the Bloch sphere: RY(θ) sets the latitude, RZ(φ) the longitude. Together with CNOT, the set {H, T, CNOT} is universal: any n-qubit unitary can be approximated to any precision from those three alone. That is why the T gate, not the more common S, decides the cost of fault-tolerant circuits.
Prepare a target state
The goal is the state with probability 0.75 on |1⟩ and phase π/2 on it. The slider on RY sets the probability (cos²(θ/2) = 0.25 → θ = 2π/3); the RZ adds the phase. Check the Amplitudes view.
OPENQASM 3.0; include "stdgates.inc"; qubit[1] q; ry(2*pi/3) q[0]; rz(pi/2) q[0];
| You want | Use |
|---|---|
| Flip the probabilities | x |
| An equal superposition | h (or ry(pi/2)) |
| Any probability p on |1⟩ | ry(2·acos(√(1−p))) |
| A phase without changing probabilities | p(λ) / rz(θ) / s / t |
Which pair of gates is equal up to a global phase?
Sign in to answer and earn XP; you will come back to this lesson.
Why is {H, S, CNOT} not universal while {H, T, CNOT} is?
Sign in to answer and earn XP; you will come back to this lesson.
Phase gates rotate about Z; RY sets probabilities, RZ sets phase. With CNOT and H, a single non-Clifford gate such as T is enough to build anything.
Up next: Two-qubit gates: CNOT, CZ, SWAP