Types
Qadence Types
TArray = Union[Iterable, torch.Tensor, np.ndarray]
module-attribute
Union of common array types.
TGenerator = Union[torch.Tensor, sympy.Array, sympy.Basic]
module-attribute
Union of torch tensors and numpy arrays.
TNumber = Union[int, float, complex]
module-attribute
Union of python number types.
TParameter = Union[TNumber, torch.Tensor, sympy.Basic, str]
module-attribute
Union of numbers, tensors, and parameter types.
AlgoHEvo
Bases: StrEnum
Hamiltonian Evolution algorithms that can be used by the backend.
EIG = 'EIG'
class-attribute
instance-attribute
Using Hamiltonian diagonalization.
EXP = 'EXP'
class-attribute
instance-attribute
Using torch.matrix_exp on the generator matrix.
RK4 = 'RK4'
class-attribute
instance-attribute
4th order Runge-Kutta approximation.
BasisSet
Bases: StrEnum
Basis set for feature maps.
CHEBYSHEV = 'Chebyshev'
class-attribute
instance-attribute
Chebyshev polynomials of the first kind.
FOURIER = 'Fourier'
class-attribute
instance-attribute
Fourier basis set.
Endianness
Bases: StrEnum
The endianness convention to use.
BIG = 'Big'
class-attribute
instance-attribute
Use Big endianness.
LITTLE = 'Little'
class-attribute
instance-attribute
Use little endianness.
FigFormat
Bases: StrEnum
Available output formats for exporting visualized circuits to a file.
PDF = 'PDF'
class-attribute
instance-attribute
PDF format.
PNG = 'PNG'
class-attribute
instance-attribute
PNG format.
SVG = 'SVG'
class-attribute
instance-attribute
SVG format.
GenDAQC
Bases: StrEnum
The type of interaction for the DAQC transform.
NN = 'NN'
class-attribute
instance-attribute
NN
ZZ = 'ZZ'
class-attribute
instance-attribute
ZZ
Interaction
Bases: StrEnum
Interaction types used in
- add_interaction
.
- hamiltonian_factory
.
NN = 'NN'
class-attribute
instance-attribute
NN-Ising Interaction, N=(I-Z)/2
XY = 'XY'
class-attribute
instance-attribute
XY Interaction
XYZ = 'XYZ'
class-attribute
instance-attribute
XYZ Interaction
ZZ = 'ZZ'
class-attribute
instance-attribute
ZZ-Ising Interaction
LTSOrder
Bases: StrEnum
Lie-Trotter-Suzuki approximation order.
BASIC = 'BASIC'
class-attribute
instance-attribute
Basic.
ST2 = 'ST2'
class-attribute
instance-attribute
ST2.
ST4 = 'ST4'
class-attribute
instance-attribute
ST4.
LatticeTopology
Bases: StrEnum
Lattice topologies to choose from for the register.
ALL_TO_ALL = 'all_to_all'
class-attribute
instance-attribute
All to all- connected lattice.
ARBITRARY = 'arbitrary'
class-attribute
instance-attribute
Arbitrarily-shaped lattice.
CIRCLE = 'circle'
class-attribute
instance-attribute
Circular lattice.
HONEYCOMB_LATTICE = 'honeycomb_lattice'
class-attribute
instance-attribute
Honeycomb-shaped lattice.
LINE = 'line'
class-attribute
instance-attribute
Line-format lattice.
RECTANGULAR_LATTICE = 'rectangular_lattice'
class-attribute
instance-attribute
Rectangular-shaped lattice.
SQUARE = 'square'
class-attribute
instance-attribute
Square lattice.
TRIANGULAR_LATTICE = 'triangular_lattice'
class-attribute
instance-attribute
Triangular-shaped shape.
OpName
Bases: StrEnum
A list of all available of digital-analog operations.
ANALOGENTANG = 'AnalogEntanglement'
class-attribute
instance-attribute
The analog entanglement operation.
ANALOGRX = 'AnalogRX'
class-attribute
instance-attribute
The analog RX operation.
ANALOGRY = 'AnalogRY'
class-attribute
instance-attribute
The analog RY operation.
ANALOGRZ = 'AnalogRZ'
class-attribute
instance-attribute
The analog RZ operation.
ANALOGSWAP = 'AnalogSWAP'
class-attribute
instance-attribute
The analog SWAP operation.
CNOT = 'CNOT'
class-attribute
instance-attribute
The CNOT gate.
CPHASE = 'CPHASE'
class-attribute
instance-attribute
The controlled PHASE gate.
CRX = 'CRX'
class-attribute
instance-attribute
The Control RX gate.
CRY = 'CRY'
class-attribute
instance-attribute
The Controlled RY gate.
CRZ = 'CRZ'
class-attribute
instance-attribute
The Control RZ gate.
CSWAP = 'CSWAP'
class-attribute
instance-attribute
The Control SWAP gate.
CZ = 'CZ'
class-attribute
instance-attribute
The CZ gate.
ENTANG = 'entangle'
class-attribute
instance-attribute
The entanglement operation.
H = 'H'
class-attribute
instance-attribute
The Hadamard gate.
HAMEVO = 'HamEvo'
class-attribute
instance-attribute
The Hamiltonian Evolution operation.
I = 'I'
class-attribute
instance-attribute
The Identity gate.
MCPHASE = 'MCPHASE'
class-attribute
instance-attribute
The Multicontrol PHASE gate.
MCRX = 'MCRX'
class-attribute
instance-attribute
The Multicontrol RX gate.
MCRY = 'MCRY'
class-attribute
instance-attribute
The Multicontrol RY gate.
MCRZ = 'MCRZ'
class-attribute
instance-attribute
The Multicontrol RZ gate.
MCZ = 'MCZ'
class-attribute
instance-attribute
The Multicontrol CZ gate.
N = 'N'
class-attribute
instance-attribute
The N = (1/2)(I-Z) operator
PHASE = 'PHASE'
class-attribute
instance-attribute
The PHASE gate.
RX = 'RX'
class-attribute
instance-attribute
The RX gate.
RY = 'RY'
class-attribute
instance-attribute
The RY gate.
RZ = 'RZ'
class-attribute
instance-attribute
The RZ gate.
S = 'S'
class-attribute
instance-attribute
The S gate.
SDAGGER = 'SDagger'
class-attribute
instance-attribute
The S dagger gate.
SWAP = 'SWAP'
class-attribute
instance-attribute
The SWAP gate.
T = 'T'
class-attribute
instance-attribute
The T gate.
TDAGGER = 'TDagger'
class-attribute
instance-attribute
The T dagger gate.
TOFFOLI = 'Toffoli'
class-attribute
instance-attribute
The Toffoli gate.
U = 'U'
class-attribute
instance-attribute
The U gate.
WAIT = 'wait'
class-attribute
instance-attribute
The wait operation.
X = 'X'
class-attribute
instance-attribute
The X gate.
Y = 'Y'
class-attribute
instance-attribute
The Y gate.
Z = 'Z'
class-attribute
instance-attribute
The Z gate.
ZERO = 'Zero'
class-attribute
instance-attribute
The zero gate.
OverlapMethod
Bases: StrEnum
Overlap Methods to choose from.
COMPUTE_UNCOMPUTE = 'compute_uncompute'
class-attribute
instance-attribute
Compute-uncompute.
EXACT = 'exact'
class-attribute
instance-attribute
Exact.
HADAMARD_TEST = 'hadamard_test'
class-attribute
instance-attribute
Hadamard-test.
JENSEN_SHANNON = 'jensen_shannon'
class-attribute
instance-attribute
Jensen-shannon.
SWAP_TEST = 'swap_test'
class-attribute
instance-attribute
Swap-test.
ParameterType
Bases: StrEnum
Parameter types available in qadence.
FEATURE = 'Feature'
class-attribute
instance-attribute
FeatureParameters act as input and are not trainable.
FIXED = 'Fixed'
class-attribute
instance-attribute
Fixed/ constant parameters are neither trainable nor act as input.
VARIATIONAL = 'Variational'
class-attribute
instance-attribute
VariationalParameters are trainable.
QubitSupportType
Bases: StrEnum
Qubit support types.
GLOBAL = 'global'
class-attribute
instance-attribute
Use global qubit support.
ResultType
Bases: StrEnum
Available data types for generating certain results.
NUMPY = 'Numpy'
class-attribute
instance-attribute
Numpy Array Type.
STRING = 'String'
class-attribute
instance-attribute
String Type.
TORCH = 'Torch'
class-attribute
instance-attribute
Torch Tensor Type.
ReuploadScaling
Bases: StrEnum
Scaling for data reuploads in feature maps.
CONSTANT = 'Constant'
class-attribute
instance-attribute
Constant scaling.
EXP = 'Exponential'
class-attribute
instance-attribute
Exponentially increasing scaling.
TOWER = 'Tower'
class-attribute
instance-attribute
Linearly increasing scaling.
SerializationFormat
Bases: StrEnum
Available serialization formats for circuits.
JSON = 'JSON'
class-attribute
instance-attribute
The Json format.
PT = 'PT'
class-attribute
instance-attribute
The PT format used by Torch.
StateGeneratorType
Bases: StrEnum
Methods to generate random states.
HAAR_MEASURE_FAST = 'HaarMeasureFast'
class-attribute
instance-attribute
HaarMeasure.
HAAR_MEASURE_SLOW = 'HaarMeasureSlow'
class-attribute
instance-attribute
HaarMeasure non-optimized version.
RANDOM_ROTATIONS = 'RandomRotations'
class-attribute
instance-attribute
Random Rotations.
StrEnum
Strategy
Bases: StrEnum
Computing paradigm.
ANALOG = 'Analog'
class-attribute
instance-attribute
Use the analog paradigm.
BDAQC = 'bDAQC'
class-attribute
instance-attribute
Use the banged digital-analog QC paradigm.
DIGITAL = 'Digital'
class-attribute
instance-attribute
Use the digital paradigm.
SDAQC = 'sDAQC'
class-attribute
instance-attribute
Use the step-wise digital-analog QC paradigm.
TensorType
Bases: StrEnum
Tensor Types for converting blocks to tensors.
DENSE = 'Dense'
class-attribute
instance-attribute
Convert a block to a dense tensor.
SPARSE = 'Sparse'
class-attribute
instance-attribute
Convert a observable block to a sparse tensor.
SPARSEDIAGONAL = 'SparseDiagonal'
class-attribute
instance-attribute
Convert a diagonal observable block to a sparse diagonal if possible.