Malcolm Low | Practical AI, Computing & Quantum Research

Singapore-based practical guides, tutorials and experiments in AI, computing, modelling, simulation, optimisation and quantum computing, with research notes and hands-on workflows.

Bloch Sphere Guide: Stop Phase Errors With Y, S & T Gates

Yes, quantum phase rotates on the Y-axis. Ignoring complex amplitudes distorts unitary evolution. Master Y, S, and T rotations with our 3D Qiskit guide →

·

Written by

3D Bloch sphere vector transformations showing Pauli Y bit and phase flip, S gate 90 degree equatorial rotation, and T gate 45 degree rotation
Part of the Quantum Computing: A Complete Learning Path series. Bridging single-qubit real geometry in Bloch Sphere Explained (Module 2) to complex phase control and Two-Qubit Entanglement (Module 3).
Quick Answer & Key Insight

How Do Pauli Y, S, and T Gates Rotate States on the Bloch Sphere?

Yes, Pauli Y, S, and T gates perform orthogonal rotations across the complex plane. The Pauli Y gate rotates the state vector by π radians (180°) around the y-axis, mapping |0⟩ to i|1⟩ while leaving its eigenstates |+i⟩ and |−i⟩ invariant. The Phase S gate rotates the equator by π/2 radians (90°) around the z-axis, mapping the real state |+⟩ into the imaginary state |+i⟩. The T gate rotates by π/4 radians (45°), providing the essential non-Clifford operation required for universal quantum computation. Confusing real superposition with complex phase leads to fatal state drift in quantum algorithms.

QUANTUM SERIES 2026 • MODULE 2b
The complex dimension of the Bloch sphere: Y-axis eigenstates, equatorial phase gates, and the mixed Bloch ball.

In our foundational Bloch sphere guide, we visualized how classical bits transition into quantum superpositions along the real coordinate plane (the x and z axes). We established that the computational basis states |0⟩ and |1⟩ occupy the North and South poles, while the Hadamard gate rotates them to the equatorial states |+⟩ and |−⟩.

However, quantum mechanics operates in complex Hilbert space C², not real Euclidean space R². Without the y-axis, quantum computing loses the imaginary unit i, making it mathematically impossible to perform continuous equatorial phase rotations, execute the Quantum Fourier Transform, or achieve universal fault-tolerant computation. Below, we break down single-qubit complex geometry from first principles, examine the Pauli Y, S, and T gates, and verify state evolution with 3D Matplotlib and Qiskit diagrams.


1  ·  Why We Need the Y-Axis: The Complex Geometry of Hilbert Space

Any normalized single-qubit pure state in two-dimensional complex Hilbert space C² is expressed algebraically as a linear combination of the computational basis states:

|ψ⟩ = α |0⟩ + β |1⟩,    where α, β ∈ C  and  |α|² + |β|² = 1

Because an overall global phase factor e^{iγ} has no physically observable consequence, we factor out the complex phase of α, leaving the canonical spherical parameterization:

|ψ⟩ = cos(θ/2) |0⟩ + e^{iφ} sin(θ/2) |1⟩

Here, two geometric angles define the exact coordinate position of the state vector on the unit Bloch sphere:

  • Polar angle θ ∈ [0, π]: Controls the relative weighting (amplitude) between |0⟩ and |1⟩. When measured in the computational basis, P(0) = cos²(θ/2) and P(1) = sin²(θ/2).
  • Azimuthal angle φ ∈ [0, 2π): Encodes the relative quantum phase. It defines the equatorial longitude and governs how states interfere during subsequent gate operations.

The Cartesian coordinates on the 3D unit sphere map directly to the expectation values of the Pauli operators:

x = sin(θ) cos(φ) = 2 Re(α* β)
y = sin(θ) sin(φ) = 2 Im(α* β)
z = cos(θ)           = |α|² − |β|²

If quantum mechanics were restricted to real amplitudes (β ∈ R), then φ could only take values 0 or π, locking the state vector to the two-dimensional x-z plane (y = 0). The y-axis represents non-zero imaginary phase components (sin(φ) ≠ 0), establishing the physical foundation for phase interference and circular state trajectories.

Interactive Simulator Live Pure 3D Vector Canvas

Want to test these Y-basis states and phase rotations in 3D? We built an Interactive 3D Bloch Sphere Simulator where you can rotate the sphere, explore the complex equatorial plane (|+i⟩ and |−i⟩), slide θ and φ continuously, and inspect measurement probabilities in real time.

→ Launch 3D Simulator (Interactive) View Simulator Guide & Exercises
2  ·  The Y-Basis States: Superposition with an Imaginary Phase

When θ = π/2, the state vector sits directly on the equatorial plane, yielding an equal 50/50 measurement probability between |0⟩ and |1⟩. Setting azimuthal angles φ = π/2 and φ = 3π/2 defines the Y-basis:

Positive Y-Axis (+y, φ = π/2):   |+i⟩ = ( |0⟩ + i|1⟩ ) / √2
Negative Y-Axis (−y, φ = 3π/2):  |−i⟩ = ( |0⟩ − i|1⟩ ) / √2
Bloch sphere 3D diagram showing the 6 cardinal quantum states and equatorial phase rotations under T and S gates

Figure 1: The six cardinal quantum states on the Bloch sphere and equatorial phase trajectories under the T and S gates.

Like the computational basis {|0⟩, |1⟩} and the Hadamard basis {|+⟩, |−⟩}, the Y-basis {|+i⟩, |−i⟩} forms a mutually unbiased orthonormal basis in Hilbert space:

⟨+i | −i⟩ = ½ (1 − i) [ 1, −i ]ª = ½ (1 − i²) = ½ (1 + 1) = 0

These states possess maximal phase chirality. Measuring |+i⟩ in the computational basis collapses to 0 or 1 with completely random 50% probability, but measuring along the y-axis returns eigenvalue +1 with 100% deterministic certainty.

3  ·  The Pauli Y Gate: 180° Rotation Around the Y-Axis

The Pauli Y operator completes the algebra of single-qubit observables. It combines both bit-flip and phase-flip operations into a single unitary transformation:

Y = [[ 0, -i ],
     [ i,  0 ]] = i · X · Z

Geometrically, the Pauli Y gate performs a π radian (180°) right-handed rotation around the y-axis of the Bloch sphere:

Y |0⟩ =  i |1⟩    (North Pole → South Pole, picking up phase i)
Y |1⟩ = -i |0⟩    (South Pole → North Pole, picking up phase -i)

Because global phase factors are unobservable, i|1⟩ and −i|0⟩ correspond exactly to the South and North poles on the Bloch sphere, identical to the action of the X gate. However, while X rotates states through the real x-z meridian, Y swings vectors through the imaginary y-z plane.

Furthermore, because |+i⟩ and |−i⟩ lie directly on the y-axis, they are the eigenstates of Y: Y |+i⟩ = +1 |+i⟩ and Y |−i⟩ = −1 |−i⟩.

4  ·  The Phase Gate Hierarchy: Z, S, and T Rotations

While X, Y, and H rotate states across different latitudes (changing computational basis measurement probabilities), phase gates rotate state vectors exclusively around the z-axis.

P(λ) = [[ 1, 0 ],
         [ 0, e^{iλ} ]]

The phase gate family forms a natural geometric hierarchy of fractional rotations around the z-axis:

  • Pauli Z Gate (λ = π): 180° rotation around the z-axis. Maps |+⟩ ↔ |−⟩ across the equator (+x to −x).
  • Phase S Gate (λ = π/2): 90° rotation around the z-axis (S² = Z). Maps the real Hadamard state to the imaginary Y-basis state: S |+⟩ = |+i⟩.
  • Phase T Gate (λ = π/4): 45° rotation around the z-axis (T² = S, T⁴ = Z). Often called the π/8 gate due to its diagonal phase representation.

Why the T Gate Unlocks Universal Quantum Computation: Under the famous Gottesman-Knill theorem, any quantum circuit consisting purely of Clifford group operations (Hadamard H, Phase S, and Controlled-NOT CNOT) can be perfectly simulated in polynomial time on an ordinary classical computer. Clifford gates only rotate states between the 6 cardinal poles on the Bloch sphere (±x, ±y, ±z). The T gate breaks out of this finite discrete Clifford group by rotating states into the non-Clifford octants. Adding the T gate to the Clifford group is what makes quantum computing universal and classically intractable.

5  ·  Visual Progression: Y, S, and T Gate Operations Side by Side

The multi-panel diagram below tracks the exact geometric state transformations of the Pauli Y, Phase S, and Phase T gates on 3D Bloch spheres (which you can also manipulate dynamically in our 3D Bloch sphere simulator):

3D Bloch sphere vector transformations showing Pauli Y bit and phase flip, S gate 90 degree equatorial rotation, and T gate 45 degree rotation

Figure 2: 3D Bloch sphere vector transformations showing the Pauli Y bit-and-phase flip, the S gate 90° equatorial rotation, and the T gate 45° rotation.

Quantum Gate Geometric Rotation & Axis Coordinate Map & Action
Y gate 180° about y-axis (x,y,z) → (−x,y,−z) · Maps |0⟩ → i|1⟩
S gate 90° about z-axis (x,y,z) → (−y,x,z) · Maps |+⟩ → |+i⟩
T gate 45° about z-axis (x,y,z) → ((x−y)/√2, (x+y)/√2, z) · Non-Clifford octant rotation
6  ·  Beyond the Surface: The Bloch Ball, Mixed States & Entanglement

Every state vector plotted on a standard Bloch sphere has Euclidean length |r| = 1. These represent pure states, where complete quantum information about the system is known.

However, realistic quantum processors interact with environmental thermal noise, causing decoherence. Furthermore, when two qubits become entangled, individual subsystems can no longer be described by a state vector |ψ⟩. Instead, we must describe the system using the density matrix ρ:

ρ = ½ ( I + r · σ ) = ½ [[ 1 + z,   x − iy ],
                            [ x + iy,  1 − z   ]]

The Euclidean radius |r| = √(x² + y² + z²) dictates the purity of the physical quantum state:

  • Pure States (|r| = 1): Lie exclusively on the outer surface of the Bloch sphere (Tr(ρ²) = 1).
  • Mixed States (0 < |r| < 1): Lie strictly inside the interior of the Bloch ball (Tr(ρ²) < 1). This captures statistical uncertainty or decoherence (T1 relaxation and T2 dephasing).
  • Maximally Mixed State (|r| = 0): Located at the exact center origin of the sphere (ρ = ½ I).

Why Entangled Qubits Vanish from the Surface: When two qubits form an entangled Bell pair |Φ+⟩ = (|00⟩ + |11⟩)/√2, tracing out the second qubit yields the reduced density matrix ρ_A = Tr_B(|Φ+⟩⟨Φ+|) = ½ I. The Bloch vector of qubit A has length |r| = 0. Its vector collapses completely into the origin. While the composite two-qubit system is in a perfectly pure state, inspecting either qubit in isolation reveals total randomness.

7  ·  Python Implementation: Generate Bloch Spheres with Qiskit & Matplotlib

You can reproduce both 3D Bloch sphere diagrams using standard Qiskit 2.x and Matplotlib:

import matplotlib.pyplot as plt
import numpy as np
from qiskit.circuit.library import SGate, TGate, YGate
from qiskit.quantum_info import Statevector
from qiskit.visualization.bloch import Bloch

def bloch_vector(state):
    # Calculates [x, y, z] coordinates from a 2-element Statevector
    alpha, beta = state.data
    overlap = np.conj(alpha) * beta
    return [
        float(2 * np.real(overlap)),
        float(2 * np.imag(overlap)),
        float(abs(alpha) ** 2 - abs(beta) ** 2),
    ]

# 1. Base Quantum States
zero = Statevector.from_label("0")
plus = Statevector.from_label("+")

# 2. Gate Evolutions
y_zero = zero.evolve(YGate())
s_plus = plus.evolve(SGate())
t_plus = plus.evolve(TGate())

# 3. Setup Multi-Panel Progression Figure (3 rows x 2 cols)
rows = [
    ("Y gate", zero, y_zero, r"Y input: $|0\\rangle$", r"Y output: $i|1\\rangle$"),
    ("S gate", plus, s_plus, r"S input: $|+\\rangle$", r"S output: $|+i\\rangle$"),
    ("T gate", plus, t_plus, r"T input: $|+\\rangle$", r"T output: $(|0\\rangle + e^{i\\pi/4}|1\\rangle)/\\sqrt{2}$"),
]

fig = plt.figure(figsize=(9.6, 12.6), facecolor="white")

for row_index, (gate, before, after, before_title, after_title) in enumerate(rows):
    for col_index, (state, title, color) in enumerate((
        (before, before_title, "#1565C0"),
        (after, after_title, "#D32F2F"),
    )):
        ax = fig.add_subplot(3, 2, row_index * 2 + col_index + 1, projection="3d")
        sphere = Bloch(fig=fig, axes=ax, font_size=12)
        sphere.xlabel = [r"$|+\\rangle$", r"$|-\\rangle$"]
        sphere.ylabel = [r"$|+i\\rangle$", r"$|-i\\rangle$"]
        sphere.zlabel = [r"$|0\\rangle$", r"$|1\\rangle$"]
        sphere.vector_color = [color]
        sphere.add_vectors(bloch_vector(state))
        sphere.render(title=title)

    fig.text(
        0.03, 0.805 - row_index * 0.31, gate,
        rotation=90, va="center", ha="center", fontweight="bold", fontsize=14
    )

fig.suptitle(
    "Bloch-Sphere Gate Progression: Y, then S, then T",
    fontsize=18, fontweight="bold", y=0.98
)
plt.savefig("bloch_sphere_y_s_t_gates.png", dpi=300, bbox_inches="tight")
print("Saved bloch_sphere_y_s_t_gates.png successfully!")
Key Insights & Takeaways
  1. The Y-Axis Captures Quantum Phase: The positive and negative y-axes represent the eigenstates |+i⟩ and |−i⟩, embodying quantum superposition with an imaginary phase factor e^{iπ/2}.
  2. Phase Gates Preserve Computational Amplitudes: The Z, S, and T gates rotate vectors strictly around the z-axis, changing relative interference without altering the probabilities of measuring 0 or 1.
  3. The T Gate is Computationally Essential: While X, Y, Z, H, and S belong to the classically simulable Clifford group, the non-Clifford 45° rotation of the T gate enables universal quantum computing.
  4. Surface vs. Core: Pure states remain on the unit surface (|r| = 1). Decoherence and entanglement drag the Bloch vector inside the sphere toward the center origin (|r| < 1).
Frequently Asked Questions

Why does the Pauli Y gate add an imaginary i to the state?

The Pauli Y matrix is defined with imaginary components [[0, -i], [i, 0]]. When operating on |0⟩, it yields i|1⟩. Because global phase is unobservable, i|1⟩ points directly to the South Pole on the Bloch sphere, identical to X|0⟩ = |1⟩, but its trajectory traverses through the complex y-z plane.

What is the difference between the S gate and the T gate?

The S gate rotates the qubit state by 90° (π/2 radians) around the z-axis, mapping the real state |+⟩ into the imaginary state |+i⟩. The T gate rotates by 45° (π/4 radians), acting as the square root of the S gate (T² = S). The T gate is non-Clifford, making it indispensable for quantum advantage.

Can an entangled two-qubit state be visualized on a single Bloch sphere?

No. The Bloch sphere is strictly a representation of single-qubit state space C². When two qubits are entangled, the composite state cannot be factored into independent state vectors. Tracing out one qubit leaves a mixed state whose Bloch vector collapses into the interior of the sphere (|r| < 1).

About the Author

Malcolm Low is an Associate Professor at the Singapore Institute of Technology, writing on quantum computing, algorithms, and practical AI systems from Singapore.

Website: malcolmlow.com  ·  Singapore

Continue the Quantum Series

← Previous: Bloch Sphere Explained: Basis States and the X and Z Gates (Module 2)
• Hands-on Lab: Drawing Quantum Diagrams with Matplotlib on Android Termux (Module 2 Lab)
• Interactive Tool: 3D Bloch Sphere Simulator Live (Direct Web App)
→ Next: Two-Qubit Entanglement Explained: The 4 Bell States (Module 3)
View the complete Quantum Computing learning path →

Comments

Leave a Reply