laboneq_applications.contrib.experiments.calibrate_cancellation
¶
This module defines the cancellation tone calibration workflow.
In this experiment, we measure the amplitude and phase of the pump tone while sweeping the phase shift and attenuation of the cancellation tone.
The cancellation tone calibration experiment has the following pulse sequence:
TWPA --- [ measure ]
This experiment only supports 1 TWPA at the time.
create_experiment(qpu, parametric_amplifier, *, cancel_phase, cancel_attenuation, cancellation_on=False, options=None)
¶
Creates a cancellation tone calibration Experiment.
Changed in version 26.4.0.
All arguments apart from session, qpu, and qubits are now keyword
arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qpu
|
QPU
|
The qpu consisting of the original pas and quantum operations. |
required |
parametric_amplifier
|
TWPA
|
The parametric amplifier to run the experiments on. |
required |
cancel_phase
|
ArrayLike
|
The phase shift of the cancellation tone. Must be a list of numbers or an array. |
required |
cancel_attenuation
|
ArrayLike
|
The attenuation of the cancellation tone. Must be a list of numbers or an array. |
required |
cancellation_on
|
bool
|
Enable or disable the cancellation tone. |
False
|
options
|
TWPATuneUpExperimentOptions | None
|
The options for building the experiment. See [TWPATuneUpExperimentOptions] and [BaseExperimentOptions] for accepted options. Overwrites the options from [BaseExperimentOptions]. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
experiment |
Experiment
|
The generated LabOne Q experiment instance to be compiled and executed. |
Example
options = {
"count": 10,
"spectroscopy_reset_delay": 3e-6
}
options = TWPATuneUpExperimentOptions(**options)
setup = DeviceSetup()
pa = TWPA("twpa0")
qpu = QPU(
qubits=[pa],
quantum_operations=TunableTransmonOperations(),
)
create_experiment(
qpu=qpu,
parametric_amplifier=pa,
frequencies=np.linspace(7.1e9, 7.6e9, 501),
options=options,
)
evaluate_experiment(analysis_results, parametric_amplifier, evaluation_parameters=None)
¶
Evaluates the cancellation tone analysis workflow result.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
analysis_results
|
WorkflowResult
|
The analysis workflow results. |
required |
parametric_amplifier
|
QuantumElement
|
The parametric_amplifier to run the experiments on. |
required |
evaluation_parameters
|
dict[str, Any] | None
|
The evaluation parameters. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, bool]]
|
The evaluation flags. |
experiment_workflow(session, qpu, parametric_amplifier, *, cancel_phase, cancel_attenuation, evaluation_parameters=None, temporary_parameters=None, options=None)
¶
The cancellation tone calibration Workflow.
The workflow consists of the following steps:
- create_experiment
- compile_experiment
- run_experiment
- analysis_workflow
- evaluate_experiment
- update_qpu
Changed in version 26.4.0.
The evaluation_parameters argument has been added, which is the dictionary of
parameters used for the newly added evaluation task. All arguments apart from
session, qpu, and qubits are now keyword arguments.
Deprecated in version 26.1.0.
The parametric_amplifier argument of type TWPA is deprecated.
Please pass parametric_amplifier of type str instead, i.e., the quantum
element UID instead of the quantum element instance.
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 pas and quantum operations. |
required |
parametric_amplifier
|
TWPA | str
|
The parametric amplifier to run the experiments on, passed by UID. |
required |
cancel_phase
|
ArrayLike
|
The phase shift of the cancellation tone. Must be a list of numbers or an array. |
required |
cancel_attenuation
|
ArrayLike
|
The attenuation of the cancellation tone. Must be a list of numbers or an array. |
required |
evaluation_parameters
|
dict[str, Any] | None
|
The dictionary of parameters used for the evaluation task. The default
evaluation parameters are defined in the |
None
|
temporary_parameters
|
dict[str, dict | TWPAParameters] | None
|
The temporary parameters to update the parametric amplifiers with. |
None
|
options
|
TuneUpWorkflowOptions | None
|
The options for building the workflow. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
The result of the workflow. |
Example
options = experiment_workflow.options()
options.create_experiment.count(10)
pa = TWPA("twpa0")
qpu = QPU(
qubits=[pa],
quantum_operations=TWPAOperations(),
)
temp_pas = qpu_copy_elements()
result = experiment_workflow(
session=session,
qpu=qpu,
parametric_amplifier=pa,
cancel_phase=[0.0, 0.1],
cancel_attenuation=[0.1, 0.5],
options=options,
).run()