laboneq_applications.contrib.experiments.bosonic_qubits.snap_calibration
¶
SNAP gate calibration workflow.
The SNAP (Selective Number-Arbitrary Phase) gate applies independent phases to each Fock state of a bosonic memory:
S(theta_vec) = sum_n exp(i*theta_n) |n><n|
Part 2 of this workflow maps the drive phase phi of the second selective pulse to the acquired cavity phase theta_n.
The Part 2 reads the angular position of the Wigner fringe. For each SNAP drive phase phi we trace the Wigner function around a circle of fixed radius |beta| = sqrt(n) by sweeping the Wigner displacement phase arg(beta). The SNAP-imprinted cavity phase shows up as an angular shift of that fringe, which is exactly the quantity we want and is robust to the multi-Fock background.
Pulse sequence per (qubit, photon number n), 2-D sweep (phi outer, arg(beta) inner)::
qb --- [D(n_bar=n)]
--- [Rx(pi, n, phase=0)]
--- [Rx(pi, n, phase=phi)]
--- [W(|beta|=sqrt(n), arg(beta)=beta_phase)]
The analysis fits, for each phi, the fringe W(arg beta) to extract its angular position theta(phi), then fits theta(phi) vs phi (expected linear, slope ~ +/-1). The intercept is the calibration constant.
Prerequisites
- Selective transmon Rx calibration (amp_pi per n).
- Displacement calibration (displacement_amp_per_unit_beta).
- Dispersive shift chi.
Note
The rx quantum operation must accept a phase keyword
argument for Part 2. The wigner_point operation must accept a
swept beta_phase.
If multiple qubits are passed, pulse sequences are applied in parallel on all qubits.
SnapAmplitudeExperimentOptions
¶
Options for the SNAP amplitude calibration experiment (Part 1).
Attributes:
| Name | Type | Description |
|---|---|---|
selective_drive_pulse |
dict | None
|
Dictionary of pulse overrides for the selective transmon drive pulse. Default: |
selective_drive_length |
float | None
|
Override for the selective drive pulse length in seconds. Default: |
memory_drive_pulse |
dict | None
|
Dictionary of pulse overrides for the displacement pulse used for state preparation. Default: |
memory_drive_length |
float | None
|
Override for the displacement pulse length in seconds. Default: |
SnapCalibrationWorkflowOptions
¶
Options for the SNAP calibration workflow.
Attributes:
| Name | Type | Description |
|---|---|---|
do_phase_calibration |
bool
|
Whether to run Part 2 (phase calibration) after
Part 1 (amplitude calibration). Part 2 uses the
π amplitude extracted by the Part 1 analysis, so it
only runs when |
do_analysis |
Whether to run the analysis workflows. Default: True. |
|
update |
Whether to store the calibrated SNAP parameters in the qpu. Default: False. |
SnapPhaseExperimentOptions
¶
Options for the SNAP phase calibration experiment (Part 2).
chunk_count and auto_chunking apply to the inner (beta-phase) sweep.
Attributes:
| Name | Type | Description |
|---|---|---|
selective_drive_pulse |
dict | None
|
Dictionary of pulse overrides for the selective transmon drive pulse. Default: |
selective_drive_length |
float | None
|
Override for the selective drive pulse length in seconds. Default: |
memory_drive_pulse |
dict | None
|
Dictionary of pulse overrides for the displacement pulse used for state preparation. Default: |
memory_drive_length |
float | None
|
Override for the displacement pulse length in seconds. Default: |
wigner_displacement_pulse |
dict | None
|
Dictionary of pulse overrides for the Wigner-tomography displacement pulse. Default: |
wigner_displacement_length |
float | None
|
Override for the Wigner displacement pulse length in seconds. Default: |
compile_amplitude_experiment(session, experiment)
¶
Compile the SNAP amplitude experiment.
compile_phase_experiment(session, experiment)
¶
Compile the SNAP phase experiment.
create_amplitude_experiment(qpu, qubits, amplitudes_transmon, photon_number_memory, options=None)
¶
Creates the SNAP amplitude calibration experiment (Part 1).
For one shared photon number n across all qubits, prepares a
coherent state with n_bar = n and sweeps the amplitude of two
selective pi pulses simultaneously on every qubit.
The correct pi amplitude is where the transmon excitation is
minimised.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpu
|
QPU
|
The qpu consisting of the original qubits and quantum operations. |
required |
qubits
|
QuantumElements
|
The qubits to run the experiment on (calibrated in parallel). |
required |
amplitudes_transmon
|
QubitSweepPoints
|
The selective drive amplitudes to sweep, one array per qubit. All arrays must share the same length. |
required |
photon_number_memory
|
int
|
The cavity photon number to calibrate (shared across qubits). |
required |
options
|
SnapAmplitudeExperimentOptions | None
|
The experiment options. |
None
|
Returns:
| Type | Description |
|---|---|
Experiment
|
The LabOne Q experiment. |
create_phase_experiment(qpu, qubits, snap_amplitudes, phases_transmon, phases_wigner, photon_number_memory, options=None)
¶
Creates the SNAP phase calibration experiment (Part 2).
Two-dimensional sweep
outer -> SNAP drive phase phi (phases_transmon) inner -> Wigner displacement phase arg(beta) (phases_wigner)
For each phi we trace a full Wigner fringe around the circle |beta| = sqrt(n). The analysis extracts the fringe angle theta(phi) and fits theta(phi) vs phi.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpu
|
QPU
|
The qpu consisting of the original qubits and quantum operations. |
required |
qubits
|
QuantumElements
|
The qubits to run the experiment on (calibrated in parallel). |
required |
snap_amplitudes
|
dict
|
The new parameter values extracted by the Part 1 analysis,
in the form |
required |
phases_transmon
|
QubitSweepPoints
|
The SNAP drive phases phi to sweep (outer axis). Either None (default grid), a single array (broadcast to all qubits), or one array per qubit. |
required |
phases_wigner
|
QubitSweepPoints
|
The Wigner displacement phases arg(beta) to sweep (inner axis). Either None (default grid), a single array (broadcast to all qubits), or one array per qubit. |
required |
photon_number_memory
|
int
|
The cavity photon number to calibrate (shared across qubits). |
required |
options
|
SnapPhaseExperimentOptions | None
|
The experiment options. |
None
|
Returns:
| Type | Description |
|---|---|
Experiment
|
The LabOne Q experiment. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no SNAP amplitude is available for a qubit at the requested photon number. |
experiment_workflow(session, qpu, qubits, *, amplitudes_transmon, phases_transmon=None, phases_wigner=None, photon_number_memory, temporary_parameters=None, options=None)
¶
The SNAP gate calibration workflow.
Runs Part 1 (amplitude calibration) and optionally Part 2 (phase calibration). Part 2 uses the calibrated pi amplitudes from Part 1 and reads out the Wigner fringe angle (see module docstring).
The workflow consists of the following steps:
- create_amplitude_experiment
- compile_amplitude_experiment
- run_amplitude_experiment
- amplitude_analysis_workflow
- compile_phase_experiment
- run_phase_experiment
- phase_analysis_workflow
- update_qpu
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
session
|
Session
|
The connected session to use for running the experiment. |
required |
qpu
|
QPU
|
The qpu consisting of the original qubits and quantum operations. |
required |
qubits
|
list[str] | str
|
The qubits to run the experiments on, passed by UID. |
required |
amplitudes_transmon
|
list[ArrayLike]
|
The selective drive amplitudes to sweep for Part 1. Should be centered around the amp_pi values from the selective Rx calibration. A single array for a single qubit, or a list of arrays (one per qubit). |
required |
phases_transmon
|
list[ArrayLike | None] | None
|
The SNAP drive phases to sweep for Part 2 (radians).
If None, defaults to |
None
|
phases_wigner
|
list[ArrayLike | None] | None
|
The Wigner displacement phases arg(beta) to sweep for the
inner tomography axis (radians). If None, defaults to
|
None
|
photon_number_memory
|
int
|
The cavity photon number to calibrate. For example, |
required |
temporary_parameters
|
dict[str, dict | QuantumParameters] | None
|
Temporary parameters to update the qubits with. |
None
|
options
|
SnapCalibrationWorkflowOptions | None
|
The options for building the workflow, passed as an instance of
SnapCalibrationWorkflowOptions. Setting |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
The result of the workflow. |
Example
# QPU from a single-qubit device setup
qpu = QPU(
quantum_elements=BosonicQubit.from_device_setup(setup),
quantum_operations=BosonicQubitOperations(),
)
result = experiment_workflow(
session=session,
qpu=qpu,
qubits="q0",
amplitudes_transmon=np.linspace(0.1, 0.9, 51),
photon_number_memory=3,
).run()
run_amplitude_experiment(session, compiled_experiment)
¶
Run the SNAP amplitude experiment.
run_phase_experiment(session, compiled_experiment)
¶
Run the SNAP phase experiment.
snap_amp_handle(qubit_uid, n)
¶
Return the result handle for a SNAP amplitude measurement.
snap_phase_handle(qubit_uid, n)
¶
Return the result handle for a SNAP phase measurement.