State and pulse tomography¶
This notebook compares standard and DRAG half-pi pulses using state
tomography and pulse tomography. The same pattern also works for any
waveform or PulseSchedule you want to reconstruct.
1. Create an Experiment¶
import qubex as qx
exp = qx.Experiment(
system_id="YOUR_SYSTEM_ID",
muxes=[0],
# config_dir="/path/to/qubex-config/config",
# params_dir="/path/to/qubex-config/params/YOUR_SYSTEM_ID",
)
2. Connect to the setup¶
Connect before you run any calibration or tomography routine.
exp.connect()
3. Check the waveform¶
Use a waveform check to confirm that the readout path looks healthy.
waveform_result = exp.check_waveform()
4. Measure a baseline Rabi oscillation¶
The baseline Rabi result gives you a reference before you calibrate the pi pulses.
rabi_result = exp.obtain_rabi_params()
5. Calibrate and save the pi pulses¶
Calibrate both the default and DRAG pi pulses, then save the calibration note.
pi_result = exp.calibrate_pi_pulse()
drag_pi_result = exp.calibrate_drag_pi_pulse()
exp.calib_note.save()
6. Repeat the calibrated pulses¶
Run repeated-sequence checks for the default and DRAG pi pulses before tomography.
repeat_pi = exp.repeat_sequence(exp.pi_pulse)
repeat_drag_pi = exp.repeat_sequence(exp.drag_pi_pulse)
7. Inspect the cached pulse waveforms¶
Plot the cached pi and DRAG pi pulses for the target qubit.
Q0 = exp.qubit_labels[0]
print("target qubit:", Q0)
pi_pulse = exp.pi_pulse[Q0]
pi_pulse.plot()
drag_pi_pulse = exp.drag_pi_pulse[Q0]
drag_pi_pulse.plot()
8. Run state tomography for the default pi pulse¶
Reconstruct the state prepared by the default pi pulse.
state_default = exp.state_tomography(
{
Q0: exp.pi_pulse[Q0],
}
)
9. Run state tomography for the DRAG pi pulse¶
Repeat the same reconstruction for the DRAG pi pulse.
state_drag = exp.state_tomography(
{
Q0: exp.drag_pi_pulse[Q0],
}
)
10. Run pulse tomography for the default pi pulse¶
Use pulse tomography to reconstruct the effective rotation of the default pi pulse.
pulse_default = exp.pulse_tomography(
{
Q0: exp.pi_pulse[Q0],
}
)
11. Run pulse tomography for the DRAG pi pulse¶
Repeat the pulse-tomography measurement for the DRAG pi pulse.
pulse_drag = exp.pulse_tomography(
{
Q0: exp.drag_pi_pulse[Q0],
}
)