Single-Qubit Gates
An ideal single-qubit gate is a unitary operator
acting on a chosen two-dimensional computational basis
It changes amplitudes, relative phases, or both. On the Bloch sphere, every one-qubit unitary acts as a proper three-dimensional rotation. Conversely, every proper rotation of the Bloch sphere is represented by two special-unitary matrices, and , and by infinitely many matrices if arbitrary global phases are retained.
The matrices below connect common gate names to rotations, phase changes and basis measurements. They describe ideal operations; the final section explains how a control Hamiltonian approximates them.
Helpful background. The Bloch sphere describes one-qubit states and measurement axes; Pauli matrices supplies the algebra; the circuit model fixes how gates are composed.
Unitary qubit gates and phase conventions
Section titled “Unitary qubit gates and phase conventions”Basis and action
Section titled “Basis and action”Unless stated otherwise, matrices below use the ordered computational basis
and act on state columns from the left. If a diagram applies and then , its matrix is
The rightmost factor acts first. A change of computational basis changes every displayed matrix by conjugation, so a gate name without a basis convention is incomplete.
Three notions of equality
Section titled “Three notions of equality”For gate calculations, distinguish:
- Exact matrix equality: .
- Equality up to global phase: .
- Equality as an isolated quantum channel:
The second implies the third. It does not permit phases to be dropped blindly inside a controlled operation, an interferometer, or any larger construction in which the allegedly global phase becomes branch dependent.
A general element of has four real parameters. Factoring out leaves three physically relevant parameters for an isolated one-qubit gate. Those three parameters specify a rotation axis and angle, or equivalently three Euler angles.
Pauli Gates
Section titled “Pauli Gates”The Pauli gates are
Their basis-state actions are
exchanges computational-basis populations. preserves those populations and reverses the sign of the amplitude. combines both effects with phases fixed by the convention
The informal names “bit flip,” “phase flip,” and “bit-and-phase flip” are useful mnemonics, but they refer to the chosen computational basis. In another basis, the same operator has a different matrix and operational description.
Each Pauli gate is Hermitian, unitary, traceless, and involutory:
Their products retain noncommutative phase information:
whereas reversing either factor changes the sign. Pauli matrices derives the algebra and its relation to spin.
Pauli gates as half turns
Section titled “Pauli gates as half turns”Define a rotation about a unit vector by
Then
Thus a Pauli gate is a Bloch-sphere rotation by about its named axis, up to the common phase . On a Bloch vector ,
Hadamard Gate
Section titled “Hadamard Gate”The Hadamard gate is
It exchanges the computational and eigenbases:
This is why appears before a computational-basis measurement when one wants to measure in the basis. It is better understood as a basis-changing unitary than as a device that “creates randomness.” Applied to , it creates a coherent superposition. Randomness appears only when that state is measured in an incompatible basis.
Conjugation by exchanges and while reversing :
Consequently, its Bloch action is
Geometrically, is a rotation by about
up to phase:
The exact Hadamard matrix has determinant and lies in rather than ; and are its two special-unitary representatives up to phase.
Phase, S, and T Gates
Section titled “Phase, S, and T Gates”The continuous phase-gate family is
It leaves computational-basis probabilities unchanged but changes the relative phase:
The common discrete gates are
They satisfy
is often called the π/8 gate because, up to global phase,
Its relative phase is , while the exponent contains . Stating the matrix removes the naming ambiguity.
Phase gates versus z rotations
Section titled “Phase gates versus z rotations”The rotation is
Therefore
For an isolated qubit, and produce the same density-operator transformation and the same Bloch rotation. They are not the same matrix. The distinction matters when the operation is controlled and the matrix phase becomes relative between branches.
, , and the Pauli gates belong to the one-qubit Clifford group: they map Pauli operators to Pauli operators under conjugation. does not. Universal Gate Sets develops the computational consequences of that distinction; it should not be confused with a claim that one physical pulse is intrinsically more difficult on every hardware platform.
Continuous Rotation Gates
Section titled “Continuous Rotation Gates”For ,
With the convention above,
Positive gives the active right-hand-rule rotation of the Bloch vector when states transform as . A source using , a passive coordinate rotation, or a different convention will reverse signs. Never compare pulse angles without comparing definitions.
For a general axis,
the matrix is
where
This formula is useful for checking signs, but the exponential form better exposes the generator and composition structure.
Bloch-Sphere Action
Section titled “Bloch-Sphere Action”Write
Under a unitary ,
where . One convenient definition is
This representation makes several facts immediate:
- unitaries preserve , purity, and angles between Bloch vectors;
- no isolated one-qubit unitary can turn a mixed state into a pure state;
- and give the same ;
- after removing a global phase from a general matrix, the resulting special-unitary matrix and represent the same spatial rotation;
- gate composition maps to rotation composition in the same operator order.
The Bloch sphere is exact for one qubit, but it does not scale into a complete picture of a multi-qubit state. A local one-qubit gate acting on one part of an entangled state still has a matrix on that subsystem, yet the joint state lives in a tensor-product space. Local unitaries preserve bipartite entanglement measures even while they change local measurement statistics and correlation axes.
Global Phase Can Become Relative Phase
Section titled “Global Phase Can Become Relative Phase”State-vector phase
Section titled “State-vector phase”The state vectors
represent the same ray. By contrast,
are generally different rays because only one branch was rephased. Their relative phase changes interference and equatorial measurement probabilities.
Gate phase
Section titled “Gate phase”Let
Then the isolated channels agree, . Now define a controlled operation with the control as the first tensor factor:
Then
so the two controlled gates differ by a phase gate on the control. This is why replacing by is harmless for a standalone target but not automatically harmless after adding a control. Exact phase conventions are part of a reusable gate definition.
Composition and Useful Identities
Section titled “Composition and Useful Identities”The most reliable way to simplify a short gate sequence is to choose one representation and keep the order explicit:
- multiply exact matrices when phase matters;
- conjugate Pauli operators for basis-change questions;
- compose rotations for Bloch-vector questions;
- act on basis states for simple circuit semantics.
For example, means acts first:
But
The two sequences differ because and do not commute.
Useful inverse and power relations include
The last identity holds without a Baker–Campbell–Hausdorff correction because both rotations have the same generator. Rotations about different axes generally do not commute.
Basis Changes for Preparation and Readout
Section titled “Basis Changes for Preparation and Readout”A basis change can move complexity from the measurement to a preceding gate. Suppose hardware measures after a unitary . The effective observable on the input is
With the conventions on this page:
| Desired input basis | Gates before readout | Total pre-rotation | Effective observable |
|---|---|---|---|
| none | |||
| , then |
For the last row,
This table specifies the temporal order as well as the matrix product. Writing only “use and ” is ambiguous because the gates do not commute.
The reverse viewpoint prepares cardinal states. Starting from ,
Preparation and readout circuits are related by adjoints, but a real experiment may assign different errors to preparation pulses, frame updates, and measurement. Gate identities alone do not certify state-preparation-and-measurement performance.
Arbitrary One-Qubit Gates
Section titled “Arbitrary One-Qubit Gates”Euler decomposition
Section titled “Euler decomposition”Every one-qubit unitary can be written
To extract angles, first choose so that . Then
When , one choice is
Indeed, the product has and . If , only matters; if , only matters. Set one redundant angle to zero rather than taking the argument of a zero matrix entry.
The angles are not unique at coordinate singularities or after periodic shifts. This is a coordinate decomposition, not a claim that a device literally executes three pulses in that form. A compiler may cancel neighboring rotations, absorb rotations into a frame, or choose another native basis. Gate Decomposition uses Euler factors as one-qubit leaves inside controlled, Cartan/KAK, dense-unitary, and finite-alphabet synthesis.
The decomposition also gives a direct state-preparation rule. For
one has
Thus two rotations prepare any pure qubit state from up to global phase. A general gate needs a third rotation because it must specify the action on an entire basis, not only on one input ray.
Software parameterizations
Section titled “Software parameterizations”Circuit languages often expose a three-angle universal gate, but names, angle order, signs, and global phases are not universal. The OpenQASM 3 specification, for example, defines a built-in three-parameter together with an explicit global-phase operation; compatibility gates inherited from earlier versions use related but phase-shifted conventions.
Before translating a matrix into software:
- read the versioned gate definition;
- check whether the equality is exact or only up to phase;
- verify basis and qubit ordering;
- test the action on both and ;
- retain the documented phase when the gate may later be controlled.
From Ideal Matrix to Physical Control
Section titled “From Ideal Matrix to Physical Control”An ideal gate symbol names a target unitary. A physical device realizes time evolution generated by a control Hamiltonian, often modeled in an appropriate rotating frame as
The resulting propagator is
For a constant direction and pulse area
this reduces to in the ideal rotating-frame model. Detuning, leakage, crosstalk, finite bandwidth, decoherence, and calibration drift turn the implemented operation into a channel that only approximates the target.
A named gate need not correspond to a dedicated physical pulse. In many driven-qubit platforms it can be implemented as a software frame update that changes the phases of later drives. Such a virtual Z gate can be effectively instantaneous in the control schedule, but it still changes the interpretation of subsequent axes and must be tracked consistently. Other platforms may implement the same logical matrix by different controls.
Keep four layers separate:
| Layer | Object | Question |
|---|---|---|
| Logical | ideal matrix | What transformation is intended? |
| Compiled | sequence in a native gate set | How is decomposed for this target? |
| Scheduled | pulses, frame updates, and timing | What controls are issued and when? |
| Implemented | noisy channel | What transformation did the device realize? |
Rabi and Ramsey control develops the driven dynamics; pulse-level control discusses calibrated frames and waveforms; noise in quantum information describes implementation errors.
Comparing two gate matrices
Section titled “Comparing two gate matrices”For two ideal matrices , a quick test for equality up to phase is
This criterion assumes both matrices are unitary. It says their isolated channels agree; it does not establish that two noisy implementations have the same error process.
Exercises
Section titled “Exercises”1. Pauli action with phases
Section titled “1. Pauli action with phases”For
compute , , and . Verify .
Solution
Direct matrix action gives
Applying first and then ,
The phase is part of the exact operator identity.
2. Phase gate versus z rotation
Section titled “2. Phase gate versus z rotation”Show that . Then show that their controlled versions differ by on the control qubit.
Solution
Multiplying by gives
Using
with and gives
The factor is a relative phase between the control branches and cannot generally be discarded.
3. Gate order on a cardinal state
Section titled “3. Gate order on a cardinal state”Starting from , compare with . Give both final Bloch vectors.
Solution
Since ,
whose Bloch vector is . On the other hand, , so
whose Bloch vector is . The rightmost gate acts first.
4. Prepare an arbitrary pure qubit
Section titled “4. Prepare an arbitrary pure qubit”Prove that
prepares the Bloch-sphere state with polar angle and azimuth , up to global phase.
Solution
First,
Applying gives
The prefactor is global. The remaining state has the required polar and azimuthal angles.
5. Hadamard conjugation
Section titled “5. Hadamard conjugation”Verify and by matrix multiplication. Use the result to explain why applying , measuring , and forgetting the final state realizes an -basis measurement of the input.
Solution
Direct multiplication gives
and
The probability of outcome after applying is
These are exactly the -measurement probabilities of the original state.
6. Pulse area and sign check
Section titled “6. Pulse area and sign check”Suppose a rotating-frame control Hamiltonian is constant:
for a duration , with real nonzero . Find the ideal gate and the earliest positive duration that produces up to global phase. How does that phase depend on the sign of ?
Solution
The propagator is
Choose . Then the pulse area is , and
For positive the phase is ; for negative it is . Both give the isolated channel of . If a coherent controlled implementation is later constructed, its relative branch phase must follow the actual controlled Hamiltonian, including terms omitted as global phases in the isolated-qubit model.
References
Section titled “References”- A. Barenco, C. H. Bennett, R. Cleve, D. P. DiVincenzo, N. Margolus, P. Shor, T. Sleator, J. A. Smolin, and H. Weinfurter, “Elementary gates for quantum computation,” Physical Review A 52, 3457–3467, 1995, doi:10.1103/PhysRevA.52.3457.
- D. C. McKay, C. J. Wood, S. Sheldon, J. M. Chow, and J. M. Gambetta, “Efficient gates for quantum computing,” Physical Review A 96, 022330, 2017, doi:10.1103/PhysRevA.96.022330.
- N. D. Mermin, Quantum Computer Science: An Introduction, Cambridge University Press, 2007, doi:10.1017/CBO9780511813870.
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press, 2010, doi:10.1017/CBO9780511976667.
- OpenQASM contributors, OpenQASM 3 Specification, “Gates” and “Standard library,” versioned specification.
- J. Preskill, Lecture Notes for Physics 219/Computer Science 219: Quantum Computation, Chapter 5, California Institute of Technology, course materials.
- J. J. Sakurai and J. Napolitano, Modern Quantum Mechanics, 3rd ed., Cambridge University Press, 2020, doi:10.1017/9781108587280.