ChipLayout#
Module: exa.common.qcm_data.chip_layout
- class ChipLayout(qubits, couplers, computational_resonators, qubits_without_probeline=None, angles=None)#
Bases:
objectThe 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
componentscomputational_resonatorscouplersqubitsqubits_without_probelineMethods
Construct the chip layout from a raw chip design record.
Get the angles for all qubits.
Get the coordinates for all qubits.
Get the angle for the given component.
Get the coordinates for the given component.
mirror_yaxisChanges the origin of the Cartesian coordinate system such that all elements move into the first quadrant.
Rescale component coordinates
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:
- 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.
- get_all_qubit_coordinates()#
Get the coordinates for all qubits.
- get_angle(component)#
Get the angle for the given component.
Inheritance
