Skip to content

laboneq_applications.contrib.experiments.bosonic_qubits.swap_calibration

SWAP gate calibration workflow.

The SWAP gate exchanges a single excitation between the ancilla transmon and the memory cavity:

|e, n⟩  ↔  |g, n+1⟩

Combined with a preceding transmon π pulse, it prepares a |1⟩ Fock state in the cavity starting from vacuum:

|g, 0⟩ --[π]--> |e, 0⟩ --[SWAP]--> |g, 1⟩

The SWAP is parameterised by the drive amplitude and duration.

Calibration modes:

  1. Length sweep:
  2. SWAP length swept in near time
  3. amplitude fixed from stored qubit parameter

  4. Amplitude sweep:

  5. SWAP amplitude swept in real time
  6. length fixed from stored qubit parameter

  7. 2D sweep:

  8. length swept in near time
  9. amplitude swept in real time

Pulse sequence per qubit (all modes):

qb --- [Rx(π)] --- [SWAP(amp, length)] --- [measure transmon]

If multiple qubits are passed, pulse sequences are applied in parallel on all qubits.

SwapExperimentOptions

Options for the SWAP calibration experiment.

Attributes:

Name Type Description
swap_pulse dict | None

Dictionary of pulse overrides for the SWAP pulse. If None, the qubit parameter swap_pulse is used.

Default: None

create_experiment(qpu, qubits, swap_durations=None, swap_amplitudes=None, options=None)

Creates the SWAP calibration experiment.

Sweep placement
  • 1D length sweep -> near time
  • 1D amplitude sweep -> real time
  • 2D sweep -> length near time, amplitude real time

experiment_workflow(session, qpu, qubits, *, swap_durations=None, swap_amplitudes=None, temporary_parameters=None, options=None)

The SWAP gate calibration workflow.

The workflow consists of the following steps:

Modes
  • Only swap_durations given -> near-time length sweep
  • Only swap_amplitudes given -> real-time amplitude sweep
  • Both given -> 2D sweep with near-time length and real-time amplitude

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. May be either a single qubit or a list of qubits.

required
swap_durations QubitSweepPoints | None

The SWAP pulse durations to sweep for each qubit (near-time sweep). If None, no length sweep is performed. At least one of swap_durations or swap_amplitudes must be provided.

None
swap_amplitudes QubitSweepPoints | None

The SWAP pulse amplitudes to sweep for each qubit (real-time sweep). If None, no amplitude sweep is performed. At least one of swap_durations or swap_amplitudes must be provided.

None
temporary_parameters dict[str, dict | QuantumParameters] | None

The temporary parameters to update the qubits with.

None
options TuneUpWorkflowOptions | None

The options for building the workflow, passed as an instance of TuneUpWorkflowOptions. In addition to options from WorkflowOptions, the following custom options are supported:

  • create_experiment: The options for creating the experiment.

Setting update to True stores the calibrated swap_length and/or swap_amplitude in the qpu.

None

Returns:

Name Type Description
result None

The result of the workflow.

Raises:

Type Description
ValueError

If both swap_durations and swap_amplitudes are None.

Example

Length sweep:

# 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",
    swap_durations=np.linspace(100e-9, 600e-9, 51),
).run()

Amplitude sweep:

# 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",
    swap_amplitudes=np.linspace(0.1, 0.9, 51),
).run()

2D sweep (length x amplitude):

# 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",
    swap_durations=np.linspace(100e-9, 600e-9, 21),
    swap_amplitudes=np.linspace(0.1, 0.9, 21),
).run()

swap_handle(qubit_uid)

Return the result handle for a SWAP calibration measurement.