Run a measurement#
Build a pulse sequence from ops, then hand it to device.execute. Here's a
simple pulse–acquire, averaged over 16 scans:
sequence = [
ops.Pulse("x+", "90deg"), # 90° excitation pulse
ops.Silence(20), # 20 µs ring-down delay
ops.Record(2000), # acquire for 2000 µs
]
device.execute(sequence, num_accum=16) # runs, averages, plots, and
# stores the result in state.spectrum
spec = state.spectrum
device.execute returns the acquired spectra and, by default, also plots them
and stores the accumulated result in state.spectrum.
Set conditions before acquiring, and use the Wobble preset for an
inversion-recovery block:
device.set_temperature(25, unit="C")
device.set_frequency(20, unit="MHz")
# 180° – τ – 90° – acquire, ready for a T1 experiment
ir_block = ops.Wobble(acq_time_us=2000, tau_2_us=50_000)
device.execute(ir_block, num_accum=8)
Once you have a spectrum, see Fit a curve to model it or T1, T2 & dynamics for relaxation analysis.