NMR recipes
Complete programmes to paste into the editor. Each one says what to look at on the NMR Analysis tab.
Calibrate a pulse with a sweep
#settings NmrSample "proton" #settings NmrReadout "none" Pulse(<0, 30, 60, 90, 120, 150, 180>, "x", 0) Readout(0)
Step through the sweep on the Parametric Sweep tab. The readout pulse turns whatever z magnetisation the calibration pulse left into signal, so the line follows cos of the flip angle: full at 0°, gone at 90°, fully inverted at 180°. Finding the null at 90° and the deepest inversion at 180° is exactly how pulses are calibrated on a spectrometer.
Read J from a spectrum
#settings NmrSample "chloroform" // nothing to do: the proton doublet is split by 215 Hz
Switch the axis to Hz and click the line: the offset reads 3629 + 107.5 Hz because the carbon sits in |0⟩. Add X 1 and the line moves to 3629 − 107.5 Hz. Add H 1 instead and both lines appear at half height: the carbon is in a superposition.
Echo against precession
#settings NmrReadout "none" // A: precession only Pulse(90, "x", 0) Delay(0.0005, 250, 0) // B: the same delay inside an echo; comment A out and uncomment B // SpinEcho(0.0005, 250, 0)
With A the Bloch vector of spin 0 has turned by 45° from −y; the spectrum line is part absorptive, part dispersive. With B the spin is back on the y axis whatever offset you type.
Antiphase and polarisation transfer
#settings NmrSample "chloroform" #settings NmrReadout "none" #settings NmrChannel "13C" INEPT(215, 0, 1)
The carbon channel shows a doublet whose two lines have opposite signs: antiphase magnetisation that came from the proton. Add JCouple(1/(4*215), 215, 0, 1) after two more 90° pulses to refocus it into an in-phase doublet.
A CNOT the NMR way
#settings NmrSample "chloroform" H 0 CX [0,1]
Open the pulse programme: the CNOT is a 90°y pulse on the target, a 1.17 ms delay, simultaneous 180° pulses, another 1.17 ms delay and a 90°−y pulse, then a virtual z on the control. The Bell state it makes shows on the ¹H channel as an antiphase doublet after the readout pulse, and the Bloch view shows both spins fully mixed.
Your own routine
function RefocusedINEPT(float J=215.0, int ... = 0..1) {
name: Refocused INEPT
category: NMR
w = arg[1..argmax]
tj = 1 / (2 * J)
tq = 1 / (4 * J)
Pulse(90.0, "x", w[0])
JCouple((float)tj, (float)J, w[0], w[1])
Pulse(90.0, "y", w[0])
Pulse(90.0, "x", w[1])
JCouple((float)tq, (float)J, w[0], w[1])
}
RefocusedINEPT()
Give float parameters defaults with a decimal point, wrap classical values in (float) when passing them on, and put the spins last as int .... The function then shows in the Functions palette under NMR like the library ones.