Skip to content

Results are limited to Qoolqit v0.4.0

Product news
You are reading Qoolqit v0.4.0, an older version of this documentation. Go to the latest version (v1.6.0)

qoolqit.register

module
qoolqit.register

Classes

  • Register — The Register in QoolQit, representing a set of qubits with coordinates.

class
Register (qubits: dict)

The Register in QoolQit, representing a set of qubits with coordinates.

Default constructor for the Register.

Parameters

  • qubits : dict — a dictionary of qubits and respective coordinates {q: (x, y), ...}.

Attributes

  • qubits : dict — Returns the dictionary of qubits and respective coordinates.

  • qubits_ids : list — Returns the qubit keys.

  • n_qubits : int — Number of qubits in the Register.

Methods

classmethod
from_graph (graph: DataGraph) → Register

Initializes a Register from a graph that has coordinates.

Parameters

  • graph : DataGraph — a DataGraph instance.

Raises

  • ValueError

classmethod
from_coordinates (coords: list) → Register

Initializes a Register from a list of coordinates.

Parameters

  • coords : list — a list of coordinates [(x, y), ...]

Raises

  • TypeError

property
qubits : dict

Returns the dictionary of qubits and respective coordinates.

property
qubits_ids : list

Returns the qubit keys.

property
n_qubits : int

Number of qubits in the Register.

method
distances () → dict

Distance between each qubit pair.

method
min_distance () → float

Minimum distance between all qubit pairs.

method
radial_distances () → dict

Radial distance of each qubit from the origin.

method
max_radial_distance () → float

Maximum radial distance between all qubits.

method
interactions () → dict

Interaction 1/r^6 between each qubit pair.

method
draw (return_fig: bool = False) → plt.Figure | None

Draw the register.

Parameters

  • return_fig : bool — boolean argument to return the plt.Figure instance.