quantum_device#

Module containing the QuantumDevice object.

Module Contents#

Classes#

QuantumDevice

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

class QuantumDevice(name: str)[source]#

Bases: qcodes.instrument.base.Instrument

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.

elements[source]#
edges[source]#
instr_measurement_control[source]#
instr_instrument_coordinator[source]#
cfg_sched_repetitions[source]#
keep_original_schedule[source]#
hardware_config[source]#
scheduling_strategy[source]#
_instrument_references[source]#
to_json() str[source]#

Convert the QuantumDevice data structure to a JSON string.

Returns:

The json string containing the serialized QuantumDevice.

to_json_file(path: str | None = None) str[source]#

Convert the QuantumDevice data structure to a JSON string and store it in a file.

Parameters:

path – The path to the directory where the file is created.

Returns:

The name of the file containing the serialized QuantumDevice.

classmethod from_json(data: str) QuantumDevice[source]#

Convert the JSON data to a QuantumDevice.

Parameters:

data – The JSON data in str format.

Returns:

The deserialized QuantumDevice object.

classmethod from_json_file(filename: str) QuantumDevice[source]#

Read JSON data from a file and convert it to a QuantumDevice.

Parameters:

filename – The name of the file containing the serialized QuantumDevice.

Returns:

The deserialized QuantumDevice object.

generate_compilation_config() quantify_scheduler.backends.graph_compilation.SerialCompilationConfig[source]#

Generate a config for use with a QuantifyCompiler.

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.

  • .. warning – The config currently has to be specified by the user using the hardware_config parameter.

generate_device_config() quantify_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() quantify_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) quantify_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: quantify_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 a 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.

get_edge(name: str) qcodes.instrument.base.Instrument[source]#

Returns an edge by name.

Parameters:

name – The edge name.

Returns:

The edge.

Raises:

KeyError – If key name is not present in self.edges.

add_edge(edge: quantify_scheduler.device_under_test.edge.Edge) None[source]#

Add the edges.

Parameters:

edge – The edge name connecting the elements. Has to follow the convention ‘element_0’-‘element_1’

remove_edge(edge_name: str) None[source]#

Remove an edge by name.

Parameters:

edge_name – The edge name.