Gate Decomposition
A real quantum processor never exposes the textbook menu of gates. Each platform implements a small, fixed native gate set — perhaps arbitrary rotations, one calibrated -type rotation, and a single two-qubit entangler. Everything a programmer writes, from a Hadamard to a Quantum Fourier Transform, must ultimately be rewritten in those primitives before it can run. That rewriting is called gate decomposition, and it is the first job of any transpiler.
Why decomposition is always possible
Every single-qubit gate is a unitary, and the ZXZ Euler decomposition guarantees that any such unitary factors as
for some real angles , where
This is a statement about : three Euler angles parameterize every rotation of the Bloch sphere, and the prefactor accounts for the global phase that distinguishes from . Because the global phase is physically unobservable, a transpiler is free to drop — the remaining three rotations reproduce all measurable behaviour.
Decomposing the Hadamard
The Hadamard is the canonical example. Writing it as a rotation product,
You can confirm this on the Bloch sphere: is a rotation about the axis , and the three-rotation sequence walks the same net rotation by composing a quarter turn about , a quarter turn about , and another quarter turn about .
Cost accounting
Decomposition is not free. A single logical gate can expand into several native ones, and the count matters because every physical gate carries error. A good decomposer minimizes the number of expensive operations — usually the two-qubit entangler — even if that means spending a few extra cheap single-qubit rotations. The angles produced are often irrational multiples of , which is exactly the difficulty the Solovay–Kitaev theorem (later in this module) addresses when the native set is discrete rather than continuous.
Try it
Rebuild the Hadamard using only and rotations — no h(). The grader
checks the full single-qubit unitary up to global phase.
Sign in on the full site to ask questions and join the discussion.