First time studying this topic?

Launch the interactive walkthrough to discover each component, including the 3D Q-Sphere Lab & Python in Colab.

Topic 6.5

The Pauli-Y Gate: Bit and Phase Flip with Complex Numbers

Master the second Pauli matrix: simultaneous bit-flip and phase-flip using imaginary units ($i$).

Learning Objectives

  • ✓Define the Pauli-Y matrix: [[0, -i], [i, 0]]
  • ✓Demonstrate simultaneous bit-flip and phase-flip: Y|0> = i|1> and Y|1> = -i|0>
  • ✓Visualize 180-degree rotation around the Y-axis of the Bloch sphere

📖Let's Begin with a Story

Wolfgang Pauli wasn't satisfied with just the X gate. In 1927, to describe the three-dimensional spin of electrons in magnetic fields, he introduced a triplet of 2×22 \times 2 matrices: σx\sigma_x, σy\sigma_y, and σz\sigma_z. While the X gate is purely real, the Pauli-Y Gate plunges directly into the complex plane: Y=(0−ii0)Y = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} It does something remarkable: it performs a bit-flip (turning 0 into 1 and 1 into 0) AND adds a 90-degree phase shift (ii and −i-i) simultaneously! On the Bloch sphere, it rotates the qubit 180 degrees around the Y-axis, connecting the real equator with the imaginary equator.

Why Should You Learn The Pauli-Y Gate: Bit and Phase Flip with Complex Numbers?

🎯 Practical & Engineering Stakes

The complete basis of quantum errors

Any physical error that can happen to a qubit in the real world can be mathematically decomposed into a combination of Pauli-X (bit flip), Pauli-Z (phase flip), and Pauli-Y (both simultaneously).

What Is It?

Simple Explanation

The Pauli-Y gate is a double agent: - It flips the bit (0 becomes 1, 1 becomes 0) - AND it twists the phase into the imaginary world by multiplying by ii (the square root of -1)! On the 3D globe, it spins the ball 180 degrees around the Y-axis.

Technical Explanation

The Pauli-Y matrix σy∈C2×2\sigma_y \in \mathbb{C}^{2 \times 2} is Hermitian (Y=Y†Y = Y^\dagger) and unitary (Y2=IY^2 = I): Y=(0−ii0)=iXZY = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} = i X Z It acts on computational basis states as Y∣0⟩=i∣1⟩Y|0\rangle = i|1\rangle and Y∣1⟩=−i∣0⟩Y|1\rangle = -i|0\rangle. Its eigenstates are ∣+i⟩=∣0⟩+i∣1⟩2|+i\rangle = \frac{|0\rangle + i|1\rangle}{\sqrt{2}} and ∣−i⟩=∣0⟩−i∣1⟩2|-i\rangle = \frac{|0\rangle - i|1\rangle}{\sqrt{2}} with eigenvalues +1+1 and −1-1.

📚 Key Terms

Pauli-Y Gate

Simple: The gate that flips the bit and adds an imaginary phase (i).
Technical: The σy\sigma_y operator generating π\pi-rotations about the y^\hat{y}-axis of the Bloch sphere.

Imaginary Unit (ii)

Simple: The mathematical number defined as the square root of -1 (i2=−1i^2 = -1).
Technical: The fundamental imaginary unit enabling complex phase rotations in Hilbert space.

Q-Sphere Lab: The Pauli-Y Gate: Bit and Phase Flip with Complex Numbers

IBM Q-Sphere Model

Interactive 3D state vector exploration, unitary transformation gates, and Born rule collapse for Topic 6.5

Azimuth: 45°Elevation: 25°
+Z |0⟩-Z |1⟩+X |+⟩+Y |+i⟩01|ψ⟩
Q-Sphere Phase Color:
0 π/2 π 3π/2

Quantum Statevector

dim(H) = 2
|ψ⟩ = (1.000 + 0.000i)|0⟩
     + (0.000 + 0.000i)|1⟩
Polar Angle (θ):0.0° (0.000π rad)
Phase Angle (ϕ):0.0° (0.000π rad)

Born Rule Probabilities: P(x) = |⟨x|ψ⟩|²Σ P = 1.00

P(|0⟩) = |α|²100.0%
P(|1⟩) = |β|²0.0%
Quantum Measurement

Apply Single-Qubit Unitary Gates

Presets:
Continuous Polar Angle θ (0° = |0⟩, 180° = |1⟩):0.0°
Continuous Phase Angle ϕ (0° to 360°):0.0°
Recent Operations Log:
#1Initial state: |0⟩

📐 Mathematical Foundation

LaTeX KaTeX
Y=(0−ii0),Y∣0⟩=i∣1⟩,Y∣1⟩=−i∣0⟩,Y=iXZY = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}, \quad Y |0\rangle = i|1\rangle, \quad Y |1\rangle = -i|0\rangle, \quad Y = i X Z

What does it mean?

The Pauli-Y Gate (Bit & Phase Flip): Performs both a bit flip (like X) and a phase flip (like Z) simultaneously, rotating the state vector by 180 degrees around the Y-axis of the Bloch sphere using the complex imaginary unit i.

Understanding the Symbols

Symbol / TermMeaningBeginner Interpretation
YYPauli-Y matrixThe combined bit-and-phase flip operator [[0, -i], [i, 0]]
iiImaginary unit (i² = -1)Introduces a 90-degree complex phase shift
Y∣0⟩=i∣1⟩Y |0\rangle = i|1\rangleAction on ground stateFlips ∣0⟩|0\rangle to ∣1⟩|1\rangle and attaches phase factor +i+i
Y∣1⟩=−i∣0⟩Y |1\rangle = -i|0\rangleAction on excited stateFlips ∣1⟩|1\rangle to ∣0⟩|0\rangle and attaches phase factor −i-i

📊 Numerical Example

Applying Pauli-Y to state |0⟩ = [1, 0]^T and verifying probability:

Step 1: Multiply matrix by vector: Y ∣0⟩|0\rangle = [[0, -i], [i, 0]] × [1, 0]^T = [(0 × 1 + -i × 0), (i × 1 + 0 × 0)]^T = [0, i]^T = i ∣1⟩|1\rangle Step 2: Calculate measurement probability of outcome 1: P(1) = |i|^2 = i × i* = i × (-i) = -i^2 = -(-1) = 1.00 (100%) Step 3: Check Y² = I: Y^2 = [[0, -i], [i, 0]] × [[0, -i], [i, 0]] = [[-i^2, 0], [0, -i^2]] = [[1, 0], [0, 1]] = I ✓

Result: The state is 100% flipped to ∣1⟩|1\rangle with an unobservable global phase factor i.

⚙️ How Does It Work?

1

Complex Product

Multiply state by [[0, -i], [i, 0]].

2

Phase Attachment

Assigns phase factor +i to component |1> and -i to component |0>.

3

Bloch Rotation

Rotates Bloch vector 180 degrees around Y-axis.

🌍 Where Is It Used?

Quantum Error Correction Syndrome Extraction

Problem: Detecting combined bit-flip and phase-flip noise in quantum memory.

Solution: Surface code stabilizer circuits measure Pauli-Y syndrome operators to identify compound errors.

🎯 Try It Yourself

When Y is applied to |0>, the resulting state is i|1>. What is the probability of measuring outcome 1?

Interactive activity component

🐍 Python Hands-On: Simulating the Pauli-Y Gate & Complex Phases in Qiskit

Apply the Pauli-Y gate to analyze simultaneous bit-flips and imaginary phase rotations (+i and -i) in Qiskit.

Open Colab

1Install Required Packages

For Google Colab or Jupyter notebooks, run this shell command to install the required dependencies:

Terminal / Notebook Install Commandbash
!pip install qiskit
Packages:
qiskit

2Import Libraries

Import Statementspython
1from qiskit import QuantumCircuit
2from qiskit.quantum_info import Statevector

from qiskit import QuantumCircuit → Circuit constructor

from qiskit.quantum_info import Statevector → Statevector simulator

3Demonstration Code & Logic

Python Execution Codepython
1# Pauli-Y matrix: [[0, -i], [i, 0]]
2# Y|0> = i|1>, Y|1> = -i|0>
3qc = QuantumCircuit(1)
4qc.y(0)
5sv = Statevector.from_instruction(qc)
6print('Input |0> after Pauli-Y gate:')
7print(' Amplitudes:', sv.data)
8print(f' |0> amplitude: {sv.data[0]}')
9print(f' |1> amplitude: {sv.data[1]} (Imaginary unit i!)')
10print(' Measurement probabilities:', sv.probabilities_dict())
Step-by-Step Code Breakdown:

# Pauli-Y matrix: [[0, -i], [i, 0]]

Pauli Y definition

# Y|0> = i|1>, Y|1> = -i|0>

Mathematical behavior

qc = QuantumCircuit(1)

Single qubit in |0>

qc.y(0)

Apply Pauli-Y gate

sv = Statevector.from_instruction(qc)

Extract statevector

print('Input |0> after Pauli-Y gate:')

Label

print(' Amplitudes:', sv.data)

Complex amplitudes

print(f' |0> amplitude: {sv.data[0]}')

Amplitude 0

print(f' |1> amplitude: {sv.data[1]} (Imaginary unit i!)')

Amplitude 1 = 1j

print(' Measurement probabilities:', sv.probabilities_dict())

100% chance of |1> upon measurement

📋 Complete Script (All-in-One)

Click "Copy for Colab", open Google Colab, paste into a single cell, and run.

Google Colab Notebook Scriptpython
1# =========================================================
2# Simulating the Pauli-Y Gate & Complex Phases in Qiskit
3# Prepared for Google Colab (Run with Shift + Enter)
4# =========================================================
5
6# Step 1: Install required packages
7!pip install qiskit
8
9# Step 2: Import libraries
10from qiskit import QuantumCircuit
11from qiskit.quantum_info import Statevector
12
13# Step 3: Run Demonstration
14# Pauli-Y matrix: [[0, -i], [i, 0]]
15# Y|0> = i|1>, Y|1> = -i|0>
16qc = QuantumCircuit(1)
17qc.y(0)
18sv = Statevector.from_instruction(qc)
19print('Input |0> after Pauli-Y gate:')
20print(' Amplitudes:', sv.data)
21print(f' |0> amplitude: {sv.data[0]}')
22print(f' |1> amplitude: {sv.data[1]} (Imaginary unit i!)')
23print(' Measurement probabilities:', sv.probabilities_dict())
⚡ How to Run in Google Colab (3 Quick Steps)
  1. Click "Copy for Google Colab" above.
  2. Click Open New Google Colab Notebook (opens in a new tab).
  3. Click on the first empty code cell, press Ctrl + V (or Cmd + V) to paste, then press Shift + Enter to execute!

🔄 Algorithmic Execution Flow

1
Apply Pauli-Y

Rotate state |0> by pi radians around the Y-axis.

→
2
Extract Complex Amplitudes

Observe that the state transforms to i|1>.

→
3
Measure Probabilities

Observe that while the phase is imaginary (i), measurement probability is |i|^2 = 1.0.

📥 Input / Initial State
QuantumCircuit(1) with Y(0).
📤 Expected Output
Amplitudes: [0.0 + 0.0j, 0.0 + 1.0j]
|1> amplitude = 1j
Measurement probabilities: {'1': 1.0}
💡 What Does This Demonstration Show?

Pauli-Y combines a bit-flip with a quarter-turn complex phase shift of +i. Because |i|^2 = 1, it measures as 1 with certainty but carries an imaginary relative phase.

Course Learning Resource • Slide DeckLesson 810 Slides

Lesson 8: Two Qubits and Entanglement

Hadamard, CNOT, Bell-state intuition, and correlated quantum circuits.

Author: Dr. Syed Muzamil Basha• FDP Approved Curriculum
Open in New Tab

📝 Learning Check

Test your understanding with these questions. Remember, this is for learning, not examination!

Question 1: What is the mathematical relationship between the three Pauli matrices X, Y, and Z?

Question 2: What is unique about the Pauli-Y gate compared to X and Z gates?

Question 3: What is the matrix representation of the Pauli-Y gate?

Question 4: How is the Y gate related to X and Z gates?

Question 5: What Bloch sphere rotation does the Y gate perform?