Quantum registers
In Qadence, quantum programs can be executed by specifying the layout of a register of resources as a lattice.
Built-in Register
types can be used or constructed for arbitrary topologies.
Common register topologies are available and illustrated in the plot below.
Building and drawing registers
Built-in topologies are directly accessible in the Register
:
Arbitrarily shaped registers can be constructed by providing coordinates.
Registers defined from coordinates
Register
constructed via the from_coordinates
method do not define edges in the connectivity graph.
import numpy as np
from qadence import Register
reg = Register.from_coordinates(
[(x, np.sin(x)) for x in np.linspace(0, 2*np.pi, 10)]
)
reg.draw(show=False)
Units for qubit coordinates
Qubits coordinates in Qadence are dimensionless but converted to the required unit when executed on a backend. For instance, Pulser uses \(\mu \textrm{m}\).
Connectivity graphs
Register topology is often assumed in simulations to be an all-to-all qubit connectivity. When running on real devices that enable the digital-analog computing paradigm, qubit interaction must be specified either by specifying distances between qubits, or by defining edges in the register connectivity graph.
It is possible to access the abstract graph nodes and edges to work with if needed as in the perfect state transfer example.
It is possible to customize qubit interaction through the add_interaction
method.
In that case, Register.coords
are accessible from the concrete graph:
More details about their usage in the digital-analog paradigm can be found in the digital-analog basics section.