laboneq_applications.experiments.time_traces
¶
This module defines the raw-traces measurement.
In this measurement, raw traces are acquired for qubits in different states in order to compute the optimal integration kernels for qubit readout, which allow to maximally distinguish between the qubit states (typically, g, e, f).
The raw-traces measurement has the following pulse sequence
qb --- [prepare state] --- [measure]
The corresponding traces are acquired for all combinations of the qubits and states given by the user.
TimeTracesExperimentOptions
¶
Options for the time-traces experiment.
This class is needed to change the default value of acquisition_type compared with the value in BaseExperimentOptions.
Attributes:
Name | Type | Description |
---|---|---|
acquisition_type |
str | AcquisitionType
|
Acquisition type to use for the experiment.
Default: |
acquisition_type: str | AcquisitionType = workflow.option_field(AcquisitionType.RAW, description='Acquisition type to use for the experiment')
class-attribute
instance-attribute
¶
create_experiment(qpu, qubit, state, options=None)
¶
Creates a raw-traces Experiment.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
qpu |
QPU
|
The qpu consisting of the original qubits and quantum operations. |
required |
qubit |
QuantumElement
|
The qubit for which to create the Experiment. |
required |
state |
Literal['g', 'e', 'f']
|
The state in which to prepare the qubit. Must be 'g', 'e' or 'f'. |
required |
options |
TimeTracesExperimentOptions | None
|
The options for building the experiment as an instance of [TimeTracesExperimentOptions]. See the docstring of this class for more details. |
None
|
Returns:
Name | Type | Description |
---|---|---|
experiment |
Experiment
|
The generated LabOne Q experiment instance to be compiled and executed. |
Raises:
Type | Description |
---|---|
ValueError
|
If the state is not 'g', 'e' or 'f'. |
ValueError
|
If options.acquisition_type is not AcquisitionType.RAW or "raw". |
Example
options = TimeTracesExperimentOptions()
options.count(10)
qpu = QPU(
qubits=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_qubits()
create_experiment(
qpu=qpu,
qubits=temp_qubits,
states="gef"
options=options,
)
experiment_workflow(session, qpu, qubits, states, temporary_parameters=None, options=None)
¶
The raw-traces experiment workflow.
The workflow consists of the following tasks:
- validate_and_convert_qubits_sweeps
with for_(qubits) as qubit
:- combine_results
- analysis_workflow
- update_qubits
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 |
states |
Sequence[Literal['g', 'e', 'f']]
|
The qubit states for which to acquire the raw traces. Must be a list of strings containing g, e or f. |
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 as an instance of [TuneUpWorkflowOptions]. See the docstring of this class for more details. |
None
|
Returns:
Name | Type | Description |
---|---|---|
WorkflowBuilder |
None
|
The builder for the experiment workflow. |
Example
options = experiment_workflow.options()
options.create_experiment.count(10)
qpu = QPU(
qubits=[TunableTransmonQubit("q0"), TunableTransmonQubit("q1")],
quantum_operations=TunableTransmonOperations(),
)
temp_qubits = qpu.copy_qubits()
result = experiment_workflow(
session=session,
qpu=qpu,
qubit=temp_qubits[0],
states="gef",
options=options,
).run()