ExperimentConfiguration#

Module: iqm.cpc.core.config

class iqm.cpc.core.config.ExperimentConfiguration(config)#

Bases: object

General configuration for Experiment objects.

  • Top-level keys 'user', 'dut_label', 'settings', 'components', and 'component_groups'

    are reserved for the attributes below, and are optional.

  • Any other top-level keys generate ExperimentDefaultsConfiguration instances for specific

    Experiment classes.

Parameters:

config (dict[str, Any]) – Top-level experiment configuration tree.

Attributes

component_names

Property to return list of component names in experiment configuration.

id

Unique identifier for this ExperimentConfiguration.

user

Username.

dut_label

DUT label.

components

Mapping from chip component names to the station control controllers they use.

component_groups

Mapping from component group names to their definitions.

controllers

Controller settings.

gate_definitions

Defined quantum operations

gates

Gate implementation calibration data.

characterization

Experiment characterization data.

stages

The stage settings data.

Methods

add_conventional_controller_mapping

Add conventional controller mapping if controller_mapping is "qpu_convention".

filter_components

Helper method for filtering components based on what operations they have defined.

register_gate_implementation

Register a new gate implementation for this session.

set_calibration_data_for_gate_implementation

Set calibration data for this session.

set_gate_implementation_as_default

Set this gate implementation as default for this session.

validate_controllers

Validate controller maps against controller names in station_control.

id#

Unique identifier for this ExperimentConfiguration.

user: str#

Username.

dut_label: str#

DUT label.

components: dict[str, Any]#

Mapping from chip component names to the station control controllers they use.

component_groups: dict[str, ComponentGroup]#

Mapping from component group names to their definitions.

controllers: dict[str, Any]#

Controller settings.

gate_definitions#

Defined quantum operations

gates: dict[str, Any]#

Gate implementation calibration data.

characterization: dict[str, Any]#

Experiment characterization data.

stages: dict[str, Any]#

The stage settings data.

add_conventional_controller_mapping(station_control)#

Add conventional controller mapping if controller_mapping is "qpu_convention".

If the configuration is set to follow the standard QPU controller naming convention, extend the controllers and component_groups based on the convention. Components given explicitly have priority.

The convention is that components map their functions to controller names with the following pattern:

For qubits:

  • drive: <qubit_name>__drive

  • flux: <qubit_name>__flux

For couplers:

  • flux: <coupler_name>__flux

  • readout: <coupler_name>__readout (if connected)

For probelines:

  • readout: <probeline_name>__readout

  • twpa: <probeline_name>__twpa

Parameters:

station_control (StationControlClient) – Station instance.

Return type:

None

validate_controllers(station_control)#

Validate controller maps against controller names in station_control.

Parameters:

station_control (StationControlClient) – Station instance.

Raises:

ValueError – if the station does not have a controller required by the naming convention.

Return type:

None

property component_names: list[str]#

Property to return list of component names in experiment configuration.

filter_components(*filter_groups)#

Helper method for filtering components based on what operations they have defined.

The user can define several groups of operation requirements. Requirement groups can contain requirements that are either of the type str or any function of the type Callable[str, bool]. If a str requirement is given, it will be interpreted as a check whether this particular operation name is defined for a given component.

For example, the group [lambda c: c != ‘readout, ‘flux’] resolves to the components that do not have a readout operation but have a flux operation.

Requirement groups that contain just one requirement (of either type) can be given as a plain value instead of wrapping it into a list.

Parameters:

*filter_groups (str | Callable[[...], bool] | list[str | Callable[[...], bool]]) – requirement groups.

Returns:

  • Tuple of filtered components corresponding to the provided filter_groups.

Return type:

list[str] | tuple[list[str], …]

register_gate_implementation(gate_name, impl_name, impl_class, *, set_as_default=False, quantum_op=None)#

Register a new gate implementation for this session. See register_implementation().

Parameters:
set_calibration_data_for_gate_implementation(gate_name, impl_name, calib_data)#

Set calibration data for this session.

Parameters:
Return type:

None

set_gate_implementation_as_default(gate_name, impl_name)#

Set this gate implementation as default for this session.

Parameters:
  • gate_name (str)

  • impl_name (str)

Return type:

None

Inheritance

Inheritance diagram of iqm.cpc.core.config.ExperimentConfiguration