qoolqit.register
register
Classes:
-
Register–The Register in QoolQit, representing a set of qubits with coordinates.
Register(qubits: dict)
The Register in QoolQit, representing a set of qubits with coordinates.
Parameters:
-
(qubitsdict) –a dictionary of qubits and respective coordinates {q: (x, y), ...}.
- API reference
Methods:
-
distances–Distance between each qubit pair.
-
draw–Draw the register.
-
from_coordinates–Initializes a Register from a list of coordinates.
-
from_graph–Initializes a Register from a graph that has coordinates.
-
interactions–Interaction 1/r^6 between each qubit pair.
-
max_radial_distance–Maximum radial distance between all qubits.
-
min_distance–Minimum distance between all qubit pairs.
-
radial_distances–Radial distance of each qubit from the origin.
Attributes:
-
n_qubits(int) –Number of qubits in the Register.
-
qubits(dict) –Returns the dictionary of qubits and respective coordinates.
-
qubits_ids(list) –Returns the qubit keys.
Source code in qoolqit/register.py
n_qubits: int
property
Number of qubits in the Register.
qubits: dict
property
Returns the dictionary of qubits and respective coordinates.
qubits_ids: list
property
Returns the qubit keys.
distances() -> dict
draw(return_fig: bool = False) -> Figure | None
Draw the register.
Parameters:
-
(return_figbool, default:False) –boolean argument to return the matplotlib figure.
Source code in qoolqit/register.py
from_coordinates(coords: list) -> Register
classmethod
Initializes a Register from a list of coordinates.
Parameters:
-
(coordslist) –a list of coordinates [(x, y), ...]
Source code in qoolqit/register.py
from_graph(graph: DataGraph) -> Register
classmethod
Initializes a Register from a graph that has coordinates.
Parameters:
-
(graphDataGraph) –a DataGraph instance.