qblox_scheduler.device_under_test#
Module containing instruments that represent quantum devices and elements.
The elements and their components are intended to generate valid device configuration files for compilation from the quantum-circuit layer to the quantum-device layer description.
Submodules#
- qblox_scheduler.device_under_test.composite_square_edge
- qblox_scheduler.device_under_test.device_element
- qblox_scheduler.device_under_test.edge
- qblox_scheduler.device_under_test.hardware_config
- qblox_scheduler.device_under_test.mock_setup
- qblox_scheduler.device_under_test.nv_element
- qblox_scheduler.device_under_test.quantum_device
- qblox_scheduler.device_under_test.spin_edge
- qblox_scheduler.device_under_test.spin_element
- qblox_scheduler.device_under_test.transmon_element
Classes#
An example Edge implementation which connects two BasicTransmonElements. |
|
A device element representing an electronic qubit in an NV center. |
|
The QuantumDevice directly represents the device under test (DUT). |
|
Spin edge implementation which connects two BasicSpinElements. |
|
A device element representing a Loss-DiVincenzo Spin qubit. |
|
A device element representing a Charge Sensor connected to a tank circuit to perform |
|
A device element representing a single fixed-frequency transmon qubit. |
Package Contents#
- class CompositeSquareEdge(parent_element: qblox_scheduler.device_under_test.device_element.DeviceElement | str | None = None, child_element: qblox_scheduler.device_under_test.device_element.DeviceElement | str | None = None, **data: Any)[source]#
Bases:
qblox_scheduler.device_under_test.edge.EdgeAn example Edge implementation which connects two BasicTransmonElements.
This edge implements a square flux pulse and two virtual z phase corrections for the CZ operation between the two BasicTransmonElements.
- edge_type: Literal['CompositeSquareEdge'] = 'CompositeSquareEdge'#
- _parent_device_element: qblox_scheduler.device_under_test.transmon_element.BasicTransmonElement | None = None#
- _child_device_element: qblox_scheduler.device_under_test.transmon_element.BasicTransmonElement | None = None#
- generate_edge_config() dict[str, dict[str, qblox_scheduler.backends.graph_compilation.OperationCompilationConfig]][source]#
Generate valid device config.
Fills in the edges information to produce a valid device config for the qblox-scheduler making use of the
compile_circuit_to_device_with_config_validation()function.
- class BasicElectronicNVElement(/, name, **data: Any)[source]#
Bases:
qblox_scheduler.device_under_test.device_element.DeviceElementA device element representing an electronic qubit in an NV center.
The submodules contain the necessary device element parameters to translate higher-level operations into pulses. Please see the documentation of these classes.
Examples
Qubit parameters can be set through submodule attributes
from qblox_scheduler import BasicElectronicNVElement device_element = BasicElectronicNVElement("q2") device_element.rxy.amp180 = 0.1 device_element.measure.pulse_amplitude = 0.25 device_element.measure.pulse_duration = 300e-9 device_element.measure.acq_delay = 430e-9 device_element.measure.acq_duration = 1e-6 ...
Ellipsis
- element_type: Literal['BasicElectronicNVElement'] = 'BasicElectronicNVElement'#
- spectroscopy_operation: SpectroscopyOperationNV#
- clock_freqs: ClockFrequencies#
- reset: ResetSpinpump#
- charge_reset: ChargeReset#
- pulse_compensation: qblox_scheduler.device_under_test.transmon_element.PulseCompensationModule#
- _generate_config() dict[str, dict[str, qblox_scheduler.backends.graph_compilation.OperationCompilationConfig]][source]#
Generate part of the device configuration specific to a single qubit.
This method is intended to be used when this object is part of a device object containing multiple elements.
- generate_device_config() qblox_scheduler.backends.graph_compilation.DeviceCompilationConfig[source]#
Generate a valid device config for the qblox-scheduler.
This makes use of the
compile_circuit_to_device_with_config_validation()function.This enables the settings of this qubit to be used in isolation.
- class QuantumDevice(/, name, **data: Any)[source]#
Bases:
qblox_scheduler.structure.model.SchedulerBaseModelThe QuantumDevice directly represents the device under test (DUT).
This contains a description of the connectivity to the control hardware as well as parameters specifying quantities like cross talk, attenuation and calibrated cable-delays. The QuantumDevice also contains references to individual DeviceElements, representations of elements on a device (e.g, a transmon qubit) containing the (calibrated) control-pulse parameters.
This object can be used to generate configuration files for the compilation step from the gate-level to the pulse level description. These configuration files should be compatible with the
compile()function.- model_config#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- elements: dict[str, ConcreteDeviceElement] = None#
- edges: dict[str, ConcreteEdge] = None#
- instr_instrument_coordinator: qblox_scheduler.instrument_coordinator.InstrumentCoordinator | None = None#
- cfg_sched_repetitions: pydantic.PositiveInt = None#
- hardware_config: qblox_scheduler.backends.types.common.HardwareCompilationConfig | dict | None = None#
- scheduling_strategy: qblox_scheduler.enums.SchedulingStrategy = None#
- classmethod validate_instrument_coordinator(value: str | qblox_scheduler.instrument_coordinator.InstrumentCoordinator | None) qcodes.instrument.Instrument | None[source]#
Load InstrumentCoordinator instance from its name.
Pydantic doesn’t know how to handle a QCoDeS instrument; thus, we have to allow arbitrary types and manually fetch them with find_or_create_instrument.
- classmethod validate_scheduling_strategy(value: str | qblox_scheduler.enums.SchedulingStrategy) qblox_scheduler.enums.SchedulingStrategy[source]#
Force scheduling_strategy into its proper enum value.
- classmethod validate_elements_and_edges(data: Any, handler: pydantic.ModelWrapValidatorHandler[typing_extensions.Self]) typing_extensions.Self[source]#
Add elements and edges to the model by calling add_element and add_edge respectively to force our consistency checks.
- generate_compilation_config() qblox_scheduler.backends.graph_compilation.SerialCompilationConfig[source]#
Generate a config for use with a
ScheduleCompiler.
- generate_hardware_config() dict[str, Any][source]#
Generate a valid hardware configuration describing the quantum device.
- Returns:
The hardware configuration file used for compiling from the quantum-device layer to a hardware backend.
- generate_device_config() qblox_scheduler.backends.graph_compilation.DeviceCompilationConfig[source]#
Generate a device config.
This config is used to compile from the quantum-circuit to the quantum-device layer.
- generate_hardware_compilation_config() qblox_scheduler.backends.types.common.HardwareCompilationConfig | None[source]#
Generate a hardware compilation config.
The compilation config is used to compile from the quantum-device to the control-hardware layer.
- get_element(name: str) qblox_scheduler.device_under_test.device_element.DeviceElement[source]#
Return a
DeviceElementby name.- Parameters:
name – The element name.
- Returns:
: The element.
- Raises:
KeyError – If key
nameis not present in self.elements.
- add_element(element: qblox_scheduler.device_under_test.device_element.DeviceElement) None[source]#
Add an element to the elements collection.
- Parameters:
element – The element to add.
- Raises:
ValueError – If an element with a duplicated name is added to the collection.
TypeError – If
elementis not an instance of the base element.
- remove_element(name: str) None[source]#
Removes an element by name.
- Parameters:
name – The element name. Has to follow the convention
"{element_0}_{element_1}".
- get_edge(name: str) qblox_scheduler.device_under_test.edge.Edge[source]#
Returns an edge by name.
- Parameters:
name – The edge name. Has to follow the convention
"{element_0}_{element_1}".- Returns:
: The edge.
- Raises:
KeyError – If key
nameis not present inself.edges.
- add_edge(edge: qblox_scheduler.device_under_test.edge.Edge) None[source]#
Add the edges.
- Parameters:
edge – The edge to add.
- remove_edge(name: str) None[source]#
Remove an edge by name.
- Parameters:
name – The edge name connecting the elements. Has to follow the convention
"{element_0}_{element_1}".
- classmethod from_json_file(filename: str | pathlib.Path) typing_extensions.Self[source]#
Read JSON data from a file and convert it to an instance of the attached class.
- class SpinEdge(parent_element: qblox_scheduler.device_under_test.device_element.DeviceElement | str | None = None, child_element: qblox_scheduler.device_under_test.device_element.DeviceElement | str | None = None, **data: Any)[source]#
Bases:
qblox_scheduler.device_under_test.edge.EdgeSpin edge implementation which connects two BasicSpinElements.
This edge implements some operations between the two BasicSpinElements.
- edge_type: Literal['SpinEdge'] = 'SpinEdge'#
- _parent_device_element: qblox_scheduler.device_under_test.spin_element.BasicSpinElement | None = None#
- _child_device_element: qblox_scheduler.device_under_test.spin_element.BasicSpinElement | None = None#
- ports: PortSpinEdge#
- generate_edge_config() dict[str, dict[str, qblox_scheduler.backends.graph_compilation.OperationCompilationConfig]][source]#
Generate valid device config.
Fills in the edges information to produce a valid device config for the qblox-scheduler making use of the
compile_circuit_to_device_with_config_validation()function.
- class BasicSpinElement(/, name, **data: Any)[source]#
Bases:
qblox_scheduler.device_under_test.device_element.DeviceElementA device element representing a Loss-DiVincenzo Spin qubit. The element refers to the intrinsic spin-1/2 degree of freedom of individual electrons/holes trapped in quantum dots. The charge of the particle is coupled to a resonator.
Examples
Qubit parameters can be set through submodule attributes
from qblox_scheduler import BasicSpinElement device_element = BasicSpinElement("q1") device_element.rxy.amp180 = 0.1 device_element.measure.pulse_amp = 0.25 device_element.measure.pulse_duration = 300e-9 device_element.measure.acq_delay = 430e-9 device_element.measure.integration_time = 1e-6 ...
Ellipsis
- Parameters:
name – The name of the spin element.
kwargs – Can be used to pass submodule initialization data by using submodule name as keyword and as argument a dictionary containing the submodule parameter names and their value.
- element_type: Literal['BasicSpinElement'] = 'BasicSpinElement'#
- rxy: RxyGaussian#
- measure: DispersiveMeasurementSpin#
- pulse_compensation: qblox_scheduler.device_under_test.transmon_element.PulseCompensationModule#
- clock_freqs: ClocksFrequenciesSpin#
- _generate_config() dict[str, dict[str, qblox_scheduler.backends.graph_compilation.OperationCompilationConfig]][source]#
Generate part of the device configuration specific to a single qubit trapped in a quantum dot. A resonator to perform dispersive readout is attached to the gate to perform charge sensing.
This method is intended to be used when this object is part of a device object containing multiple elements.
- generate_device_config() qblox_scheduler.backends.graph_compilation.DeviceCompilationConfig[source]#
Generate a valid device config.
The config will be used for the qblox-scheduler making use of the
compile_circuit_to_device_with_config_validation()function.This enables the settings of this qubit to be used in isolation.
- class ChargeSensor(/, name, **data: Any)[source]#
Bases:
qblox_scheduler.device_under_test.device_element.DeviceElementA device element representing a Charge Sensor connected to a tank circuit to perform dispersive readout.
Examples
Sensor parameters can be set through submodule attributes
from qblox_scheduler import ChargeSensor sensor = ChargeSensor("s1") sensor.measure.pulse_amp = 0.25 sensor.measure.pulse_duration = 300e-9 sensor.measure.acq_delay = 430e-9 sensor.measure.integration_time = 1e-6 ...
Ellipsis
- Parameters:
name – The name of the spin element.
kwargs – Can be used to pass submodule initialization data by using submodule name as keyword and as argument a dictionary containing the submodule parameter names and their value.
- element_type: Literal['ChargeSensor'] = 'ChargeSensor'#
- measure: DispersiveMeasurementSpin#
- pulse_compensation: qblox_scheduler.device_under_test.transmon_element.PulseCompensationModule#
- ports: PortsChargeSensor#
- clock_freqs: ClocksFrequenciesSensor#
- _generate_config() dict[str, dict[str, qblox_scheduler.backends.graph_compilation.OperationCompilationConfig]][source]#
Generate part of the device configuration specific to a single qubit.
This method is intended to be used when this object is part of a device object containing multiple elements.
- generate_device_config() qblox_scheduler.backends.graph_compilation.DeviceCompilationConfig[source]#
Generate a valid device config.
The config will be used for the qblox-scheduler making use of the
compile_circuit_to_device_with_config_validation()function.This enables the settings of this qubit to be used in isolation.
- class BasicTransmonElement(/, name, **data: Any)[source]#
Bases:
qblox_scheduler.device_under_test.device_element.DeviceElementA device element representing a single fixed-frequency transmon qubit.
The qubit is coupled to a readout resonator.
Examples
Qubit parameters can be set through submodule attributes
from qblox_scheduler import BasicTransmonElement device_element = BasicTransmonElement("q3") device_element.rxy.amp180 = 0.1 device_element.measure.pulse_amp = 0.25 device_element.measure.pulse_duration = 300e-9 device_element.measure.acq_delay = 430e-9 device_element.measure.integration_time = 1e-6 ...
Ellipsis
- Parameters:
name – The name of the transmon element.
kwargs – Can be used to pass submodule initialization data by using submodule name as keyword and as argument a dictionary containing the submodule parameter names and their value.
- element_type: Literal['BasicTransmonElement'] = 'BasicTransmonElement'#
- reset: IdlingReset#
- measure: DispersiveMeasurement#
- pulse_compensation: PulseCompensationModule#
- clock_freqs: ClocksFrequencies#
- _generate_config() dict[str, dict[str, qblox_scheduler.backends.graph_compilation.OperationCompilationConfig]][source]#
Generate part of the device configuration specific to a single qubit.
This method is intended to be used when this object is part of a device object containing multiple elements.
- generate_device_config() qblox_scheduler.backends.graph_compilation.DeviceCompilationConfig[source]#
Generate a valid device config.
The config will be used for the qblox-scheduler making use of the
compile_circuit_to_device_with_config_validation()function.This enables the settings of this device element to be used in isolation.