ChipLayout#

Module: exa.common.qcm_data.chip_layout

class ChipLayout(qubits, couplers, computational_resonators, qubits_without_probeline=None, angles=None)#

Bases: object

The chip layout contains the components, their 2D cartesian coordinates, and their angles.

The subset of qubits without any probe lines, which appears in certain constellation-type chips, are stored in the additional attribute qubits_without_probeline.

The angle is assumed to lie between the positive x-axis and the orientation vector of the component and measured in degrees.

Parameters:
  • qubits (dict[str, tuple[float, float]]) – Dictionary of qubit names mapped to their 2d coordinates

  • couplers (dict[str, tuple[float, float]]) – Dictionary of coupler names mapped to their 2d coordinates

  • computational_resonators (dict[str, tuple[float, float]]) – Dictionary of computational resonators names mapped to their 2d coordinates

  • qubits_without_probeline (Iterable[str] | None) – Iterable of qubits without a probeline

  • angles (dict[str, float] | None) – Dictionary of component names mapped to their 2d coordinates

Attributes

components

computational_resonators

couplers

qubits

qubits_without_probeline

Methods

from_chip_design_record

Construct the chip layout from a raw chip design record.

get_all_qubit_angles

Get the angles for all qubits.

get_all_qubit_coordinates

Get the coordinates for all qubits.

get_angle

Get the angle for the given component.

get_coordinates

Get the coordinates for the given component.

mirror_yaxis

move_origin

Changes the origin of the Cartesian coordinate system such that all elements move into the first quadrant.

normalize_coordinates

Rescale component coordinates

rotate_layout

Clockwise rotation of coordinates.

classmethod from_chip_design_record(record)#

Construct the chip layout from a raw chip design record.

Parameters:

record (dict) – The chip design record as returned by station control.

Returns:

The corresponding chip layout.

Return type:

ChipLayout

normalize_coordinates(min_spacing)#

Rescale component coordinates

Rescale all component coordinates so that the minimum distance between 2 components is min_spacing

Parameters:

min_spacing (float)

Return type:

None

rotate_layout(angle=45)#

Clockwise rotation of coordinates.

Parameters:

angle (float)

Return type:

None

move_origin()#

Changes the origin of the Cartesian coordinate system such that all elements move into the first quadrant.

If there is a component with coordinates (x_min, y_min) it will move to (0, 0).

Return type:

None

get_coordinates(component)#

Get the coordinates for the given component.

Parameters:

component (str) – The name of the component.

Returns:

The 2D cartesian coordinates.

Return type:

tuple[float, float]

get_all_qubit_coordinates()#

Get the coordinates for all qubits.

Return type:

dict[str, tuple[float, float]]

get_angle(component)#

Get the angle for the given component.

Parameters:

component (str) – The name of the component.

Returns:

The angle of the component.

Return type:

float

get_all_qubit_angles()#

Get the angles for all qubits.

Return type:

dict[str, float]

Inheritance

Inheritance diagram of exa.common.qcm_data.chip_layout.ChipLayout