Pulse and PulsePhase
Radio-frequency pulses are the single-qubit gates of NMR. Pulse takes a flip angle in degrees and one of the four cardinal phases; PulsePhase takes any phase in degrees.
Pulse(angle, phase, wires...)
| Parameter | Type | Default | Meaning |
|---|---|---|---|
angle | float | 90 | Flip angle in degrees. 90 excites, 180 inverts, 45 is half an excitation. |
phase | string | "x" | Rotation axis: "x", "y", "-x" or "-y". |
... | wires | 0 | Spins to pulse. Several wires are pulsed at the same time. |
Pulse() // 90° about x on wire 0 Pulse(180, "y") // invert wire 0 with a 180° pulse about y Pulse(90, "-x", 1) // 90° about -x on wire 1: the inverse of Pulse(90, "x", 1) Pulse(45, "y", 0..2) // 45° about y on wires 0, 1 and 2 at once
The function is a thin layer over the rotation gates: Pulse(90, "x", 0) is exactly RX 0 0.5, and Pulse(180, "y", 0) is RY 0 1. The negative phases negate the angle. An unknown phase string stops the program with Pulse: phase must be x, y, -x or -y.
PulsePhase(angle, phi, wires...)
| Parameter | Type | Default | Meaning |
|---|---|---|---|
angle | float | 90 | Flip angle in degrees. |
phi | float | 0 | Axis azimuth in degrees from x: 0 is x, 90 is y, 180 is -x, 270 is -y. |
... | wires | 0 | Spins to pulse. |
A rotation about the axis cos φ x + sin φ y is Rz(φ) Rx(θ) Rz(−φ). In circuit order the library emits RZ by −φ, RX by θ, RZ by +φ. The two z rotations are virtual on a spectrometer: they cost no time, they shift the phase of every later pulse, and the tab draws them as small diamonds.
PulsePhase(90, 45) // 90° about the axis half way between x and y PulsePhase(180, 30, 1) // 180° about the axis 30° from x on wire 1 PulsePhase(90, 270) // the same as Pulse(90, "-y")
What a pulse costs
A hard pulse rotates at the nutation frequency γB1/2π. Its length is θ / (γB1) in radians: at 25 kHz nutation, which is B1 = 0.587 mT for protons, a 90° pulse lasts 10 µs and a 180° pulse 20 µs. For ¹³C at the same B1 the nutation is four times lower and the pulses four times longer, because γ is four times smaller. Shaped pulses (Gaussian, sinc, Hermite) reach the same flip angle with a lower mean amplitude, so the tab makes them longer by the inverse of the envelope's mean: about 2.4 times for a Gaussian.
Set B1 and the envelope on the tab toolbar or with #settings NmrRf and #settings NmrPulseShape; see #settings Nmr keys.
Pulses and the readout
Which way a spin points after a pulse matters for the spectrum. From +z, Pulse(90, "x") lands on −y and Pulse(90, "y") on +x. The tab's default readout applies its own 90°y pulse before acquiring, which turns z into the detectable x; when your programme ends with its own readout pulse, switch the tab to acquire as is or use #settings NmrReadout "none". See Readout and spectra.