device_under_test ================= .. py:module:: quantify_scheduler.device_under_test .. autoapi-nested-parse:: Module containing instruments that represent quantum devices and elements. The elements and their components are intended to generate valid :ref:`device configuration ` files for compilation from the :ref:`quantum-circuit layer ` to the :ref:`quantum-device layer description`. Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 composite_square_edge/index.rst device_element/index.rst edge/index.rst hardware_config/index.rst mock_setup/index.rst nv_element/index.rst quantum_device/index.rst spin_edge/index.rst spin_element/index.rst transmon_element/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: quantify_scheduler.device_under_test.CompositeSquareEdge quantify_scheduler.device_under_test.BasicElectronicNVElement quantify_scheduler.device_under_test.QuantumDevice quantify_scheduler.device_under_test.BasicSpinElement quantify_scheduler.device_under_test.BasicTransmonElement .. py:class:: CompositeSquareEdge(parent_element_name: str, child_element_name: str, **kwargs) Bases: :py:obj:`quantify_scheduler.device_under_test.edge.Edge` An 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. .. py:method:: generate_edge_config() -> dict[str, dict[str, quantify_scheduler.backends.graph_compilation.OperationCompilationConfig]] Generate valid device config. Fills in the edges information to produce a valid device config for the quantify-scheduler making use of the :func:`~.circuit_to_device.compile_circuit_to_device_with_config_validation` function. .. py:class:: BasicElectronicNVElement(name: str, **kwargs) Bases: :py:obj:`quantify_scheduler.device_under_test.device_element.DeviceElement` A device element representing an electronic qubit in an NV center. The submodules contain the necessary qubit parameters to translate higher-level operations into pulses. Please see the documentation of these classes. .. admonition:: Examples Qubit parameters can be set through submodule attributes .. jupyter-execute:: from quantify_scheduler import BasicElectronicNVElement qubit = BasicElectronicNVElement("q2") qubit.rxy.amp180(0.1) qubit.measure.pulse_amplitude(0.25) qubit.measure.pulse_duration(300e-9) qubit.measure.acq_delay(430e-9) qubit.measure.acq_duration(1e-6) ... .. py:attribute:: spectroscopy_operation :type: SpectroscopyOperationHermiteMW Submodule :class:`~.SpectroscopyOperationHermiteMW`. .. py:attribute:: ports :type: Ports Submodule :class:`~.Ports`. .. py:attribute:: clock_freqs :type: ClockFrequencies Submodule :class:`~.ClockFrequencies`. .. py:attribute:: reset :type: ResetSpinpump Submodule :class:`~.ResetSpinpump`. .. py:attribute:: charge_reset :type: ChargeReset Submodule :class:`~.ChargeReset`. .. py:attribute:: measure :type: Measure Submodule :class:`~.Measure`. .. py:attribute:: pulse_compensation :type: quantify_scheduler.device_under_test.transmon_element.PulseCompensationModule Submodule :class:`~.PulseCompensationModule`. .. py:attribute:: cr_count :type: CRCount Submodule :class:`~.CRCount`. .. py:attribute:: rxy :type: RxyHermite Submodule :class:`~.Rxy`. .. py:method:: _generate_config() -> dict[str, dict[str, quantify_scheduler.backends.graph_compilation.OperationCompilationConfig]] 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. .. py:method:: generate_device_config() -> quantify_scheduler.backends.graph_compilation.DeviceCompilationConfig Generate a valid device config for the quantify-scheduler. This makes use of the :func:`~.circuit_to_device.compile_circuit_to_device_with_config_validation` function. This enables the settings of this qubit to be used in isolation. .. note: This config is only valid for single qubit experiments. .. 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. .. py:class:: BasicSpinElement(name: str, **kwargs: Any) Bases: :py:obj:`quantify_scheduler.device_under_test.device_element.DeviceElement` A 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. .. admonition:: Examples Qubit parameters can be set through submodule attributes .. jupyter-execute:: from quantify_scheduler import BasicSpinElement qubit = BasicSpinElement("q1") qubit.rxy.amp180(0.1) qubit.measure.pulse_amp(0.25) qubit.measure.pulse_duration(300e-9) qubit.measure.acq_delay(430e-9) qubit.measure.integration_time(1e-6) ... :param name: The name of the spin element. :param 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. .. py:attribute:: reset :type: quantify_scheduler.device_under_test.transmon_element.IdlingReset Submodule :class:`~.IdlingReset`. .. py:attribute:: rxy :type: RxyGaussian Submodule :class:`~.RxyGaussian`. .. py:attribute:: measure :type: DispersiveMeasurementSpin Submodule :class:`~.DispersiveMeasurementSpin`. .. py:attribute:: pulse_compensation :type: quantify_scheduler.device_under_test.transmon_element.PulseCompensationModule Submodule :class:`~.PulseCompensationModule`. .. py:attribute:: ports :type: PortsSpin Submodule :class:`~.PortsSpin`. .. py:attribute:: clock_freqs :type: ClocksFrequenciesSpin Submodule :class:`~.ClocksFrequenciesSpin`. .. py:method:: _generate_config() -> dict[str, dict[str, quantify_scheduler.backends.graph_compilation.OperationCompilationConfig]] 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. .. py:method:: generate_device_config() -> quantify_scheduler.backends.graph_compilation.DeviceCompilationConfig Generate a valid device config. The config will be used for the quantify-scheduler making use of the :func:`~.circuit_to_device.compile_circuit_to_device_with_config_validation` function. This enables the settings of this qubit to be used in isolation. .. note: This config is only valid for single qubit experiments. .. py:class:: BasicTransmonElement(name: str, **kwargs) Bases: :py:obj:`quantify_scheduler.device_under_test.device_element.DeviceElement` A device element representing a single fixed-frequency transmon qubit. The qubit is coupled to a readout resonator. .. admonition:: Examples Qubit parameters can be set through submodule attributes .. jupyter-execute:: from quantify_scheduler import BasicTransmonElement qubit = BasicTransmonElement("q3") qubit.rxy.amp180(0.1) qubit.measure.pulse_amp(0.25) qubit.measure.pulse_duration(300e-9) qubit.measure.acq_delay(430e-9) qubit.measure.integration_time(1e-6) ... :param name: The name of the transmon element. :param 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. .. py:attribute:: reset :type: IdlingReset Submodule :class:`~.IdlingReset`. .. py:attribute:: rxy :type: RxyDRAG Submodule :class:`~.RxyDRAG`. .. py:attribute:: measure :type: DispersiveMeasurement Submodule :class:`~.DispersiveMeasurement`. .. py:attribute:: pulse_compensation :type: PulseCompensationModule Submodule :class:`~.PulseCompensationModule`. .. py:attribute:: ports :type: Ports Submodule :class:`~.Ports`. .. py:attribute:: clock_freqs :type: ClocksFrequencies Submodule :class:`~.ClocksFrequencies`. .. py:method:: _generate_config() -> dict[str, dict[str, quantify_scheduler.backends.graph_compilation.OperationCompilationConfig]] 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. .. py:method:: generate_device_config() -> quantify_scheduler.backends.graph_compilation.DeviceCompilationConfig Generate a valid device config. The config will be used for the quantify-scheduler making use of the :func:`~.circuit_to_device.compile_circuit_to_device_with_config_validation` function. This enables the settings of this qubit to be used in isolation. .. note: This config is only valid for single qubit experiments.