quantum_device ============== .. py:module:: quantify_scheduler.device_under_test.quantum_device .. autoapi-nested-parse:: Module containing the QuantumDevice object. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: quantify_scheduler.device_under_test.quantum_device.QuantumDevice .. py:class:: QuantumDevice(name: str) Bases: :py:obj:`quantify_scheduler.json_utils.JSONSerializableMixin`, :py:obj:`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 :meth:`~quantify_scheduler.backends.graph_compilation.QuantifyCompiler.compile` function. .. py:attribute:: elements .. py:attribute:: edges .. py:attribute:: instr_measurement_control .. py:attribute:: instr_instrument_coordinator .. py:attribute:: cfg_sched_repetitions .. py:attribute:: keep_original_schedule .. py:attribute:: hardware_config :type: quantify_scheduler.device_under_test.hardware_config.HardwareConfig The input dictionary used to generate a valid HardwareCompilationConfig using :meth:`~.generate_hardware_compilation_config`. This configures the compilation from the quantum-device layer to the control-hardware layer. Useful methods to write and reload the configuration from a json file are :meth:`~.HardwareConfig.load_from_json_file` and :meth:`~.HardwareConfig.write_to_json_file`. .. py:attribute:: scheduling_strategy .. py:attribute:: _instrument_references .. py:method:: to_json() -> str Convert the :class:`~QuantumDevice` data structure to a JSON string. Overrides the base mixin method to perform additional checks. :returns: The json string containing the serialized `QuantumDevice`. .. py:method:: generate_compilation_config() -> quantify_scheduler.backends.graph_compilation.SerialCompilationConfig Generate a config for use with a :class:`~.graph_compilation.QuantifyCompiler`. .. py:method:: generate_hardware_config() -> dict[str, Any] 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 :code:`hardware_config` parameter. .. py:method:: generate_device_config() -> quantify_scheduler.backends.graph_compilation.DeviceCompilationConfig Generate a device config. This config is used to compile from the quantum-circuit to the quantum-device layer. .. py:method:: generate_hardware_compilation_config() -> quantify_scheduler.backends.types.common.HardwareCompilationConfig | None Generate a hardware compilation config. The compilation config is used to compile from the quantum-device to the control-hardware layer. .. py:method:: get_element(name: str) -> quantify_scheduler.device_under_test.device_element.DeviceElement Return a :class:`~quantify_scheduler.device_under_test.device_element.DeviceElement` by name. :param name: The element name. :returns: The element. :raises KeyError: If key ``name`` is not present in `self.elements`. .. py:method:: add_element(element: quantify_scheduler.device_under_test.device_element.DeviceElement) -> None Add an element to the elements collection. :param element: The element to add. :raises ValueError: If a element with a duplicated name is added to the collection. :raises TypeError: If :code:`element` is not an instance of the base element. .. py:method:: remove_element(name: str) -> None Removes an element by name. :param name: The element name. .. py:method:: get_edge(name: str) -> qcodes.instrument.base.Instrument Returns an edge by name. :param name: The edge name. :returns: The edge. :raises KeyError: If key ``name`` is not present in ``self.edges``. .. py:method:: add_edge(edge: quantify_scheduler.device_under_test.edge.Edge) -> None Add the edges. :param edge: The edge name connecting the elements. Has to follow the convention 'element_0'-'element_1' .. py:method:: remove_edge(edge_name: str) -> None Remove an edge by name. :param edge_name: The edge name.