Pulse-Level Control
Below the gate: shaping microwave and laser pulses.
A gate is a promise; a pulse is how the promise is kept. Under every is a shaped microwave burst a few tens of nanoseconds long, designed against leakage, tuned by calibration loops, and sometimes discovered by numerical optimal control.
What you’ll learn
- Derive the rotating-frame, rotating-wave Hamiltonian of a driven qubit, and relate pulse area, phase and I/Q quadratures to rotations.
- Explain leakage in weakly anharmonic transmons, and derive the DRAG correction from a spectral argument.
- State the Lie-algebraic controllability criterion and derive the GRAPE gradient with forward and backward propagators.
- Design calibration sequences (Rabi, Ramsey, DRAG, error amplification) and estimate their sensitivity.
From pulses to rotations
Model a qubit of transition frequency driven by a microwave field with carrier frequency , envelope and phase (units with ):
Move to the frame rotating at the drive frequency, with , so that . Since :
Expand with and :
For the fast terms average out: the rotating-wave approximation. Writing the drive as , with in-phase and quadrature :
On resonance with a fixed phase, the Hamiltonian commutes with itself at all times, so
This is a rotation by the pulse area about the equatorial axis at angle ; a pulse has area . Because rotates that axis to , a rotation can be implemented by shifting the phase of all later pulses: the virtual Z gate (McKay et al., 2017).
Detuning tilts the rotation axis out of the equator: with the excited-state population oscillates as and never reaches 1. Feel both effects:
Leakage and DRAG
A transmon is not a two-level system but a weakly anharmonic oscillator: its transition sits at , with anharmonicity of roughly to MHz, only several percent of – GHz. A short pulse has a broad spectrum and also drives the transition, causing leakage out of the qubit subspace and phase errors from AC Stark shifts. Long pulses avoid this but waste coherence: for gates of tens of nanoseconds, the anharmonicity is the speed limit.
Write the drive as a complex envelope ; in the RWA the drive term is on each transition (with relative matrix element for ). To first order, a transition detuned by from the carrier is driven with amplitude proportional to
For a resonant drive the leakage transition sits at . A Gaussian of width has : small but nonzero at . Add a quadrature proportional to the derivative, ; integrating by parts, , so
Choose to place an exact spectral zero on the leakage transition:
This is the first-order DRAG pulse (Motzoi, Gambetta, Rebentrost & Wilhelm, 2009). Their derivation, an adiabatic frame transformation of the three-level Hamiltonian, also prescribes a small time-dependent detuning to cancel the AC Stark phase. Since , the quadrature leaves the rotation angle unchanged. In practice one writes and calibrates the dimensionless , of order one, on the device.
import numpy as np
def drag_envelope(duration, sigma, amp, beta, alpha, dt=0.25):
"""Complex DRAG envelope I + iQ (times in ns, alpha in rad/ns)."""
t = np.arange(0.0, duration, dt)
t0 = duration / 2
I = amp * np.exp(-((t - t0) ** 2) / (2 * sigma**2)) # Gaussian in-phase part
dI = -(t - t0) / sigma**2 * I # its time derivative
Q = -beta * dI / alpha # DRAG quadrature
return t, I + 1j * Q
# a 24 ns pulse on a transmon with anharmonicity -2*pi*0.3 GHz
t, env = drag_envelope(24.0, 6.0, amp=0.1, beta=1.0, alpha=-2 * np.pi * 0.3)Illustrative. Real devices truncate and offset the Gaussian so it starts and ends at zero, and calibrate amp and beta experimentally.
Why does a shorter single-qubit pulse on a transmon need the DRAG correction more urgently?
- Its rotation angle is smaller
- The rotating-wave approximation becomes exact for short pulses
- Short pulses cannot be shaped
- Its spectrum is broader, so it puts more weight at the transition detuned by
Show the answer
D. Its spectrum is broader, so it puts more weight at the transition detuned by
Spectral width scales like . For a Gaussian the weight at is , which grows rapidly as shrinks toward . DRAG removes the first-order part of that leakage drive.
Optimal control and GRAPE
DRAG is an analytic answer to one problem. Optimal control asks the general question: given , with drift and control Hamiltonians , which control functions produce a target unitary quickly and robustly? First, can they?
GRAPE (Khaneja et al., 2005) discretizes time into slices of length with piecewise-constant controls , so with , and climbs the gradient of the gate fidelity.
Fidelity to a target on a -dimensional space, insensitive to global phase:
Split at slice : forward propagator and backward propagator , so that for every . To first order in ,
Therefore
One forward sweep (all ) and one backward sweep (all ) give all gradient components, at roughly the cost of two propagations: the adjoint trick that lets GRAPE optimize thousands of parameters. Exact gradients replace the first-order formula by the derivative of the matrix exponential, and quasi-Newton methods such as L-BFGS speed up convergence.
Calibration loops
A gate set is a collection of numbers that drift. Calibration measures and corrects them in dependency order, typically:
| Experiment | Measures | Typical sequence |
|---|---|---|
| Spectroscopy | qubit frequency (coarse) | sweep the drive frequency, look for a response |
| Rabi | -pulse amplitude | sweep the amplitude at fixed duration; oscillates with the area |
| Ramsey | frequency (fine), | pulse, wait , pulse; fringes at the detuning |
| DRAG | sequences whose phase error flips sign with (e.g. versus , or repeated pairs); find where they agree | |
| Error amplification | small amplitude and phase errors | repeat a gate times so its errors add coherently |
| Randomized benchmarking | average gate fidelity | random Clifford sequences of growing length |
Your pulse over-rotates by 1%: each application rotates by about . Starting from , you apply it 20 times, which ideally returns the qubit to . What is , in percent?
Show the answer
9.5 %
Rotations about the same axis add, so the total error angle is and . A single pair of pulses would show only . Error amplification turns an invisible 1% miscalibration into a 10% signal, growing linearly in the error angle with the number of repetitions.
Calibrations depend on each other (no Ramsey before a rough pulse, no DRAG tuning before a good frequency), so labs organize them as a directed acyclic graph of experiments, re-running nodes whose checks fail. Drift from defects in the materials, temperature changes and electronics means parts of the graph re-run on timescales of hours to days.
Key takeaways
- In the rotating frame (RWA), a resonant pulse rotates about an equatorial axis: angle = pulse area, axis = drive phase (I/Q); rotations are virtual frame updates.
- Weak anharmonicity causes leakage; DRAG adds , putting a spectral zero on the transition without changing the area.
- Controllability holds iff the control Hamiltonians bracket-generate ; GRAPE climbs the fidelity gradient using forward and backward propagators.
- Calibration is a dependency graph of experiments (Rabi, Ramsey, DRAG, error amplification, RB), re-run as parameters drift.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
A resonant pulse with area and drive phase acts on . Which rotation is it?
Show the answer
B.
The area sets the angle, ; the phase sets the axis, for . The result is .
The first-order DRAG quadrature is chosen so that…
- …the pulse area doubles
- …the rotation axis aligns with
- …the complex envelope's spectrum vanishes at the transition, detuned by from the carrier
- …the pulse becomes robust to decay
Show the answer
C. …the complex envelope's spectrum vanishes at the transition, detuned by from the carrier
vanishes at , the leakage transition, to first order. The derivative term has zero area, so the rotation angle is unchanged.
Why can GRAPE compute the gradient with respect to all piecewise-constant controls at roughly the cost of two propagations?
- It uses finite differences in parallel
- The controls commute with the drift
- Only the last time slice matters
- Forward propagators and backward propagators are each accumulated in one sweep, and every component is a local trace
Show the answer
D. Forward propagators and backward propagators are each accumulated in one sweep, and every component is a local trace
This is the adjoint (backpropagation) method: store the forward products, sweep backward multiplying by , and read off each component locally. Finite differences would need full propagations.
A qubit has drift () and a single control . Is it controllable on ?
- Yes, because both the drift and the control are nonzero
- No: both generators are proportional to , so the Lie algebra they generate is one-dimensional
- Yes, given enough time
- No, because a drift term always prevents controllability
Show the answer
B. No: both generators are proportional to , so the Lie algebra they generate is one-dimensional
, so the generated algebra is and only rotations are reachable. Replace the control by and completes .
Further reading
- F. Motzoi, J. M. Gambetta, P. Rebentrost & F. K. Wilhelm, "Simple pulses for elimination of leakage in weakly nonlinear qubits", Phys. Rev. Lett. 103, 110501 (2009).
- N. Khaneja, T. Reiss, C. Kehlet, T. Schulte-Herbrüggen & S. J. Glaser, "Optimal control of coupled spin dynamics: design of NMR pulse sequences by gradient ascent algorithms", J. Magn. Reson. 172, 296 (2005).
- P. Krantz et al., "A quantum engineer's guide to superconducting qubits", Applied Physics Reviews 6, 021318 (2019).
- D. C. McKay, C. J. Wood, S. Sheldon, J. M. Chow & J. M. Gambetta, "Efficient Z gates for quantum computing", Phys. Rev. A 96, 022330 (2017).
- V. Jurdjevic & H. J. Sussmann, "Control systems on Lie groups", J. Differential Equations (1972).