CHAD#

class CHAD(*, mask_set_name, variant, components)#

Bases: ImmutableBaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Module: exa.common.qcm_data.chad_model

Attributes

computational_resonator_names

Names of all the computational resonators declared in CHAD data.

coupler_names

Names of all the couplers declared in CHAD data.

model_config

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

probe_line_names

Names of all the probe lines declared in CHAD data.

qubit_names

Names of all the qubits declared in CHAD data.

mask_set_name

variant

components

Methods

filter_qubit_components

Filter qubit components from the input components.

get_common_coupler_for

Convenience method for getting the name of a coupler connecting a pair of components.

get_component

Get component by component name.

get_coupler_mapping_for

Get the coupler-component mapping for the couplers that connects to at least two components

get_probe_line_mapping_for

Get the probe line-component mapping.

get_probe_line_names_for

Get probe lines for given qubits in CHAD data.

group_components_per_default_operations

Groups given qubits/couplers based on their defined default operations.

Parameters:
get_component(component_name)#

Get component by component name.

Parameters:

component_name (str) –

Return type:

Component

property qubit_names: list[str]#

Names of all the qubits declared in CHAD data.

property coupler_names: list[str]#

Names of all the couplers declared in CHAD data.

property probe_line_names: list[str]#

Names of all the probe lines declared in CHAD data.

property computational_resonator_names: list[str]#

Names of all the computational resonators declared in CHAD data.

filter_qubit_components(component_names)#

Filter qubit components from the input components.

Parameters:

component_names (Collection[str]) –

Return type:

list[str]

get_probe_line_names_for(component_names)#

Get probe lines for given qubits in CHAD data.

Parameters:

component_names (Collection[str]) –

Return type:

list[str]

group_components_per_default_operations(component_names)#

Groups given qubits/couplers based on their defined default operations.

The default operations that can be deducted from a CHAD are readout, drive, and flux.

Parameters:

component_names (Collection[str]) – The component names to which to do the grouping. Other components present in the CHAD will not be included in the returned data.

Returns:

  • Tuple of qubits and couplers mapped to their connected default operations.

    The data is in the form of a dict with the keys being readout, drive, and flux, and the values the list of component names having that particular operation.

Return type:

tuple[dict[str, list[str]], dict[str, list[str]]]

get_coupler_mapping_for(component_names)#
Get the coupler-component mapping for the couplers that connects to at least two components

in the given qubits.

Parameters:

component_names (Collection[str]) – The qubit names. May contain any number of qubits.

Returns:

Coupler names mapped to the components they connect.

Raises:

- ValueError – If the provided qubit name list contains duplicates.

Return type:

dict[str, list[str]]

get_probe_line_mapping_for(component_names)#

Get the probe line-component mapping.

Parameters:

component_names (Collection[str]) – The qubit names. May contain any number of qubits.

Return type:

dict[str, list[str]]

get_common_coupler_for(first_component, second_component)#

Convenience method for getting the name of a coupler connecting a pair of components.

Parameters:
  • first_component (str) – The name of the first component.

  • second_component (str) – The name of the second component. The order of qubits does not matter, i.e. the first_qubit and second_qubit arguments are interchangeable.

Returns:

  • The name of the coupler that connects the inputted components.

Raises:

- ValueError – If there were no couplers or more than one coupler connecting the component pair (the latter should not be possible in a realistic chip).

Return type:

str

model_config: ClassVar[ConfigDict] = {'frozen': True, 'ignored_types': (<class 'functools.cached_property'>,)}#

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