laboneq_applications.experiments.amplitude_fine
¶
This module defines the amplitude_fine experiment.
In this experiment, we apply the same quantum operation a variable number of times. If each quantum operation has a small rotation error theta, then the sequence of multiple quantum operations will accumulate the error reps*theta, where reps is the number of time the quantum operation is repeated. From the experiment result we can obtain the correction value for the amplitude of imperfect drive pulses.
The amplitude_fine experiment has the following pulse sequence
qb --- [ prep transition ] --- [ quantum_operation ]**reps --- [ measure ]
where reps is varied.
If multiple qubits are passed to the run
workflow, the above pulses are applied
in parallel on all the qubits.
create_experiment(qpu, qubits, amplification_qop, repetitions, options=None)
¶
Creates an Amplitude Rabi experiment Workflow.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qpu |
QPU
|
The qpu consisting of the original qubits and quantum operations. |
required |
qubits |
Qubits
|
The qubits to run the experiments on. May be either a single qubit or a list of qubits. |
required |
amplification_qop |
str
|
String to define the quantum operation that should be applied multiple times to produce error amplification. The quantum operation must exist in qop.keys(). |
required |
repetitions |
QubitSweepPoints
|
Number of time to repeat the quantum operation used to amplify the rotation
error. If |
required |
options |
TuneupExperimentOptions | None
|
The options for building the experiment. See [TuneupExperimentOptions] and [BaseExperimentOptions] for accepted options. Overwrites the options from [TuneupExperimentOptions] and [BaseExperimentOptions]. |
None
|
Returns:
Name | Type | Description |
---|---|---|
experiment |
Experiment
|
The generated LabOne Q experiment instance to be compiled and executed. |
Raises:
Type | Description |
---|---|
ValueError
|
If the qubits and qubit_amplitudes are not of the same length. |
ValueError
|
If qubit_amplitudes is not a list of numbers when a single qubit is passed. |
ValueError
|
If qubit_amplitudes is not a list of lists of numbers. |
ValueError
|
If the experiment uses calibration traces and the averaging mode is sequential. |
Example
options = TuneupExperimentOptions()
options.count(10)
options.cal_traces(True)
qpu = QPU(
qubits=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_qubits()
create_experiment(
qpu=qpu,
qubits=temp_qubits,
amplification_qop="x180",
repetitions=[
[1,2,3,4],
[1,2,3,4],
],
options=options,
)
experiment_workflow(session, qpu, qubits, amplification_qop, target_angle, phase_offset, repetitions, parameter_to_update=None, temporary_parameters=None, options=None)
¶
The amplitude fine experiment workflow.
The workflow consists of the following steps:
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 |
Qubits
|
The qubits to run the experiments on. May be either a single qubit or a list of qubits. |
required |
amplification_qop |
str
|
str to identify the quantum operation to repeat to produce error amplification. The quantum operation must exist in qop.keys(). |
required |
target_angle |
float
|
target angle the specified quantum operation shuould rotate. The target_angle is used as initial guess for fitting. |
required |
phase_offset |
float
|
initial guess for phase_offset of fit. |
required |
repetitions |
QubitSweepPoints[int]
|
The sweep values corresponding to the number of times to repeat the
amplification_qop for each qubit. If |
required |
parameter_to_update |
str | None
|
str that defines the qubit parameter to be updated. |
None
|
temporary_parameters |
dict[str, dict | TransmonParameters] | None
|
The temporary parameters to update the qubits with. |
None
|
options |
TuneUpWorkflowOptions | None
|
The options for building the workflow. In addition to options from [WorkflowOptions], the following custom options are supported: - create_experiment: The options for creating the experiment. |
None
|
Returns:
Name | Type | Description |
---|---|---|
WorkflowBuilder |
None
|
The builder of the experiment workflow. |
Example
options = experiment_workflow.options()
options.count(10)
options.transition("ge")
qpu = QPU(
qubits=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_qubits()
result = experiment_workflow(
session=session,
qpu=qpu,
qubits=temp_qubits,
amplification_qop='x180',
repetitions=[
[1,2,3,4],
[1,2,3,4],
],
options=options,
).run()
experiment_workflow_x180(session, qpu, qubits, repetitions, temporary_parameters=None, options=None)
¶
The amplitude fine experiment workflow for a x180 gate.
This workflow is the same as experiment_workflow above but with the following input parameters fixed: amplification_qop = "x180" target_angle = np.pi phase_offset = -np.pi / 2 parameter_to_update = "drive_amplitude_pi"
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 |
Qubits
|
The qubits to run the experiments on. May be either a single qubit or a list of qubits. |
required |
repetitions |
QubitSweepPoints[int]
|
The sweep values corresponding to the number of times to repeat the
amplification_qop for each qubit. If |
required |
temporary_parameters |
dict[str, dict | TransmonParameters] | None
|
The temporary parameters to update the qubits with. |
None
|
options |
TuneUpWorkflowOptions | None
|
The options for building the workflow. In addition to options from [WorkflowOptions], the following custom options are supported: - create_experiment: The options for creating the experiment. |
None
|
Returns:
Name | Type | Description |
---|---|---|
WorkflowBuilder |
None
|
The builder of the experiment workflow. |
Example
options = TuneUpExperimentWorkflowOptions()
options.create_experiment.count = 10
options.create_experiment.transition = "ge"
qpu = QPU(
qubits=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_qubits()
result = experiment_workflow(
session=session,
qpu=qpu,
qubits=temp_qubits,
repetitions=[
[1,2,3,4],
[1,2,3,4],
],
options=options,
).run()
experiment_workflow_x90(session, qpu, qubits, repetitions, temporary_parameters=None, options=None)
¶
The amplitude fine experiment workflow for a x90 gate.
This workflow is the same as experiment_workflow above but with the following input parameters fixed: amplification_qop = "x90" target_angle = np.pi / 2 phase_offset = -np.pi / 2 parameter_to_update = "drive_amplitude_pi2"
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 |
Qubits
|
The qubits to run the experiments on. May be either a single qubit or a list of qubits. |
required |
repetitions |
QubitSweepPoints[int]
|
The sweep values corresponding to the number of times to repeat the
amplification_qop for each qubit. If |
required |
temporary_parameters |
dict[str, dict | TransmonParameters] | None
|
The temporary parameters to update the qubits with. |
None
|
options |
TuneUpWorkflowOptions | None
|
The options for building the workflow. In addition to options from [WorkflowOptions], the following custom options are supported: - create_experiment: The options for creating the experiment. |
None
|
Returns:
Name | Type | Description |
---|---|---|
WorkflowBuilder |
None
|
The builder of the experiment workflow. |
Example
options = TuneUpExperimentWorkflowOptions()
options.create_experiment.count = 10
options.create_experiment.transition = "ge"
qpu = QPU(
qubits=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_qubits()
result = experiment_workflow(
session=session,
qpu=qpu,
qubits=temp_qubits,
repetitions=[
[1,2,3,4],
[1,2,3,4],
],
options=options,
).run()