qblox_scheduler.device_under_test.quantum_device#

Module containing the QuantumDevice object.

Attributes#

Classes#

QuantumDevice

The QuantumDevice directly represents the device under test (DUT).

Module Contents#

ConcreteDeviceElement[source]#
ConcreteEdge[source]#
class QuantumDevice(/, name, **data: Any)[source]#

Bases: qblox_scheduler.structure.model.SchedulerBaseModel

The 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[source]#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

elements: dict[str, ConcreteDeviceElement] = None[source]#
edges: dict[str, ConcreteEdge] = None[source]#
instr_instrument_coordinator: qblox_scheduler.instrument_coordinator.InstrumentCoordinator | None = None[source]#
cfg_sched_repetitions: pydantic.PositiveInt = None[source]#
keep_original_schedule: bool = None[source]#
hardware_config: qblox_scheduler.backends.types.common.HardwareCompilationConfig | dict | None = None[source]#
scheduling_strategy: qblox_scheduler.enums.SchedulingStrategy = None[source]#
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 DeviceElement by name.

Parameters:

name – The element name.

Returns:

: The element.

Raises:

KeyError – If key name is 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 element is 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 name is not present in self.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.