The T Gate
Every single-qubit gate can be understood as a rotation or reflection on the Bloch sphere. The T gate is a rotation about the -axis by radians — exactly 45°. Its matrix is
It leaves untouched and multiplies the amplitude of by the complex number .
Relative phase vs. global phase
A global phase on the whole state vector is physically unobservable: and give identical measurement probabilities for any observable. A relative phase between two components of a superposition is different — it genuinely changes the quantum state and can be revealed by a later gate.
For the equal superposition , applying gives
The amplitude is still ; the amplitude has rotated by 45° in the complex plane. Measuring right now still gives 50/50 — the Born-rule probabilities only depend on magnitudes. The phase difference becomes physically meaningful when you follow with another gate that mixes the two components (such as a second Hadamard).
The gate
The inverse of is called (or ) and applies a phase to :
You will need whenever you want to undo a step, for example when uncomputing an ancilla register.
Try it
Starting from , the starter code applies to create . Your task is to follow it with a gate so the final state is . After pressing Run, look at the amplitude of in the state-vector panel: it should point at in the complex plane rather than along the positive real axis.
Notice that the probabilities remain 50/50 — phase does not show up in a straight measurement. The visible difference is in the complex amplitude of : its angle has rotated from to .
Sign in on the full site to ask questions and join the discussion.