QuantumSimulator
Interactive Course
Interactive chapters from intuition to mastery
Structured Lessons
Eight modules with formulas and self-checks
Quantum Brain
Navigate lessons, laws, gates, devices, and tools
Guided Experiments
Hands-on circuits that teach one idea each
Circuit Lab
Build circuits, run them, and see the results
Gate Reference
Quick reference for all quantum gates
Cryostat Studio
3D cryostat design and simulation
Component Catalog
Browse all cryostat components
System Checks
Check your design for errors
Menu
physics
Interactive Course
Interactive chapters from intuition to mastery
Structured Lessons
Eight modules with formulas and self-checks
Quantum Brain
Navigate lessons, laws, gates, devices, and tools
Guided Experiments
Hands-on circuits that teach one idea each
simulator
Circuit Lab
Build circuits, run them, and see the results
Gate Reference
Quick reference for all quantum gates
wiringStudio
Cryostat Studio
3D cryostat design and simulation
Component Catalog
Browse all cryostat components
System Checks
Check your design for errors
HomeLessonsGate comparison
Side-by-side comparison

RX vs RY vs RZ: Which Rotation Axis to Pick

RX, RY, and RZ are the three rotation-by-angle gates that parameterize the unit Bloch sphere. Together they decompose any single-qubit unitary — so in principle you only need two of the three. In practice each has a very different relationship to measurement, and that relationship drives which one appears in which algorithm.

RX Gate (X-Rotation)gateRY Gate (Y-Rotation)gateRZ Gate (Z-Rotation)gate

Side by side

AspectRX Gate (X-Rotation)RY Gate (Y-Rotation)RZ Gate (Z-Rotation)
Axis of rotation on the Bloch sphereX axis — tips the state between the north/south poles through the +X side.Y axis — tips the state between the north/south poles through the +Y side.Z axis (vertical) — spins the state around the poles without changing latitude.
Effect on computational-basis measurement probabilitiesChanges P(0) / P(1). At θ=π this becomes the X (NOT) gate: full flip.Changes P(0) / P(1). At θ=π this becomes the Y gate: flip with a phase.Does not change P(0) / P(1) — measurement probabilities are invariant. RZ is a pure phase rotation.
Complex amplitudes in the matrixHas imaginary off-diagonal entries: -i sin(θ/2). Introduces relative phase.Real-only matrix: cos/sin, no i. Keeps amplitudes real when inputs are real.Complex diagonal only: e^{±iθ/2}. Never touches magnitudes.
Preferred role in variational circuits (VQE/QAOA)Less common as a lone parameterized gate because of its complex amplitudes; often paired with RZ.The most common parameterized single-qubit gate in VQE/QAOA ansätze: real, cheap to differentiate, covers the Bloch sphere with RZ sandwiches.The other half of the standard RZ·RY·RZ Euler decomposition used in QML and VQE.
Hardware-native behaviorTypically compiled to native Rϕ(±π/2 pulses plus RZ.Often implemented as a virtual gate on platforms where RZ is 'free' (phase change on subsequent pulses).On most superconducting-transmon hardware, RZ is virtual and takes zero physical time — the phase is absorbed into future microwave drive pulses.

When to reach for which

  • Use RY when you want real-valued coefficients and only need to change measurement probabilities (variational ansatz amplitude encoding, real-valued QML).
  • Use RZ when the state is already on the equator and you need to add phase without moving probability mass (phase estimation, interference setup).
  • Use RX when you need a rotation that produces complex amplitudes and is symmetric with the Y axis (physics-motivated Hamiltonian simulation, spin-½ time evolution).
  • For a general single-qubit unitary, use U3 (RZ·RY·RZ) instead of stacking three separate rotations.
  • On superconducting hardware, a pure RZ is near-free — prefer RZ where algebraically equivalent to save time.

Common trap

It is tempting to think RZ 'does nothing' because measurement probabilities in the computational basis don't change. But follow the RZ with a Hadamard and the hidden phase becomes visible as a flipped probability. RZ is invisible only until another gate converts the phase into amplitude — exactly how interference-based algorithms work.

Related

  • RX Gate (X-Rotation) gate — full lesson
  • RY Gate (Y-Rotation) gate — full lesson
  • RZ Gate (Z-Rotation) gate — full lesson
  • Algorithm that uses this pattern: phase kickback
  • Algorithm that uses this pattern: deutsch
  • Experiment: interference
  • Experiment: phase kickback
  • Browse the full gate reference