Skip to content
Pasqal Documentation

Types

TArray = Union[Iterable, Tensor, np.ndarray] module-attribute

Section titled “ TArray = Union[Iterable, Tensor, np.ndarray] module-attribute ”

Union of common array types.

TGenerator = Union[Tensor, sympy.Array, sympy.Basic] module-attribute

Section titled “ TGenerator = Union[Tensor, sympy.Array, sympy.Basic] module-attribute ”

Union of torch tensors and numpy arrays.

TNumber = Union[int, float, complex, np.int64, np.float64] module-attribute

Section titled “ TNumber = Union[int, float, complex, np.int64, np.float64] module-attribute ”

Union of python and numpy numeric types.

TParameter = Union[TNumber, Tensor, sympy.Basic, str] module-attribute

Section titled “ TParameter = Union[TNumber, Tensor, sympy.Basic, str] module-attribute ”

Union of numbers, tensors, and parameter types.

Bases: StrEnum

Hamiltonian Evolution algorithms that can be used by the backend.

Using Hamiltonian diagonalization.

Using torch.matrix_exp on the generator matrix.

4th order Runge-Kutta approximation.

Bases: StrEnum

Type of noise protocol.

Bases: StrEnum

Ansatz types for variational circuits.

Alternating Layer Ansatz.

Hardware-efficient ansatz.

Identity-Initialised Ansatz.

Bases: StrEnum

Basis set for feature maps.

CHEBYSHEV = 'Chebyshev' class-attribute instance-attribute

Section titled “ CHEBYSHEV = 'Chebyshev' class-attribute instance-attribute ”

Chebyshev polynomials of the first kind.

Fourier basis set.

Bases: StrEnum

Supported types of devices for Pulser backend.

IDEALIZED = 'IdealDevice' class-attribute instance-attribute

Section titled “ IDEALIZED = 'IdealDevice' class-attribute instance-attribute ”

Idealized device, least realistic.

REALISTIC = 'RealisticDevice' class-attribute instance-attribute

Section titled “ REALISTIC = 'RealisticDevice' class-attribute instance-attribute ”

Device with realistic specs.

Bases: StrEnum

Differentiation modes to choose from.

Automatic Differentiation.

Adjoint Differentiation.

Basic generalized parameter shift rule.

Bases: StrEnum

The endianness convention to use.

Use Big endianness.

Use little endianness.

Bases: StrEnum

Default distribution execution.

TORCHRUN = 'torchrun' class-attribute instance-attribute

Section titled “ TORCHRUN = 'torchrun' class-attribute instance-attribute ”

Torchrun based distribution execution.

Bases: StrEnum

Use the ml-flow experiment tracker.

TENSORBOARD = 'tensorboard' class-attribute instance-attribute

Section titled “ TENSORBOARD = 'tensorboard' class-attribute instance-attribute ”

Use the tensorboard experiment tracker.

Bases: StrEnum

Available output formats for exporting visualized circuits to a file.

PDF format.

PNG format.

SVG format.

Bases: StrEnum

The type of interaction for the DAQC transform.

NN

ZZ

Bases: StrEnum

Derivative modes w.r.t inputs of UFAs.

Reverse automatic differentiation.

Central finite differencing.

Bases: StrEnum

Interaction types used in.

NN-Ising Interaction, N=(I-Z)/2.

XY Interaction.

XYZ Interaction.

ZZ-Ising Interaction.

Bases: StrEnum

Lie-Trotter-Suzuki approximation order.

Basic.

ST2.

ST4.

Bases: StrEnum

Lattice topologies to choose from for the register.

ALL_TO_ALL = 'all_to_all' class-attribute instance-attribute

Section titled “ ALL_TO_ALL = 'all_to_all' class-attribute instance-attribute ”

All to all- connected lattice.

ARBITRARY = 'arbitrary' class-attribute instance-attribute

Section titled “ ARBITRARY = 'arbitrary' class-attribute instance-attribute ”

Arbitrarily-shaped lattice.

Circular lattice.

HONEYCOMB_LATTICE = 'honeycomb_lattice' class-attribute instance-attribute

Section titled “ HONEYCOMB_LATTICE = 'honeycomb_lattice' class-attribute instance-attribute ”

Honeycomb-shaped lattice.

Line-format lattice.

RECTANGULAR_LATTICE = 'rectangular_lattice' class-attribute instance-attribute

Section titled “ RECTANGULAR_LATTICE = 'rectangular_lattice' class-attribute instance-attribute ”

Rectangular-shaped lattice.

Square lattice.

TRIANGULAR_LATTICE = 'triangular_lattice' class-attribute instance-attribute

Section titled “ TRIANGULAR_LATTICE = 'triangular_lattice' class-attribute instance-attribute ”

Triangular-shaped shape.

Bases: StrEnum

Multivariate strategy for feature maps.

PARALLEL = 'Parallel' class-attribute instance-attribute

Section titled “ PARALLEL = 'Parallel' class-attribute instance-attribute ”

Parallel strategy.

Serial strategy.

Type of noise protocol.

ANALOG = AnalogNoise class-attribute instance-attribute

Section titled “ ANALOG = AnalogNoise class-attribute instance-attribute ”

Noise applied in analog blocks.

DIGITAL = DigitalNoise class-attribute instance-attribute

Section titled “ DIGITAL = DigitalNoise class-attribute instance-attribute ”

Noise applied to digital blocks.

READOUT = ReadoutNoise class-attribute instance-attribute

Section titled “ READOUT = ReadoutNoise class-attribute instance-attribute ”

Noise applied on outputs of quantum programs.

Bases: StrEnum

A list of all available of digital-analog operations.

ANALOGENTANG = 'AnalogEntanglement' class-attribute instance-attribute

Section titled “ ANALOGENTANG = 'AnalogEntanglement' class-attribute instance-attribute ”

The analog entanglement operation.

ANALOGINTERACTION = 'AnalogInteraction' class-attribute instance-attribute

Section titled “ ANALOGINTERACTION = 'AnalogInteraction' class-attribute instance-attribute ”

The analog interaction operation.

ANALOGRX = 'AnalogRX' class-attribute instance-attribute

Section titled “ ANALOGRX = 'AnalogRX' class-attribute instance-attribute ”

The analog RX operation.

ANALOGRY = 'AnalogRY' class-attribute instance-attribute

Section titled “ ANALOGRY = 'AnalogRY' class-attribute instance-attribute ”

The analog RY operation.

ANALOGRZ = 'AnalogRZ' class-attribute instance-attribute

Section titled “ ANALOGRZ = 'AnalogRZ' class-attribute instance-attribute ”

The analog RZ operation.

ANALOGSWAP = 'AnalogSWAP' class-attribute instance-attribute

Section titled “ ANALOGSWAP = 'AnalogSWAP' class-attribute instance-attribute ”

The analog SWAP operation.

The CNOT gate.

The controlled PHASE gate.

The Control RX gate.

The Controlled RY gate.

The Control RZ gate.

The Control SWAP gate.

The CZ gate.

ENTANGLE = 'entangle' class-attribute instance-attribute

Section titled “ ENTANGLE = 'entangle' class-attribute instance-attribute ”

The entanglement operation.

The Hadamard gate.

The Hamiltonian Evolution operation.

The Identity gate.

The Multicontrol PHASE gate.

The Multicontrol RX gate.

The Multicontrol RY gate.

The Multicontrol RZ gate.

The Multicontrol CZ gate.

The N = (1/2)(I-Z) operator.

The PHASE gate.

The projector operation.

The RX gate.

The RY gate.

The RZ gate.

The S gate.

The S dagger gate.

The SWAP gate.

The T gate.

The T dagger gate.

The Toffoli gate.

The U gate.

The X gate.

The Y gate.

The Z gate.

The zero gate.

Bases: StrEnum

Overlap Methods to choose from.

COMPUTE_UNCOMPUTE = 'compute_uncompute' class-attribute instance-attribute

Section titled “ COMPUTE_UNCOMPUTE = 'compute_uncompute' class-attribute instance-attribute ”

Compute-uncompute.

Exact.

HADAMARD_TEST = 'hadamard_test' class-attribute instance-attribute

Section titled “ HADAMARD_TEST = 'hadamard_test' class-attribute instance-attribute ”

Hadamard-test.

JENSEN_SHANNON = 'jensen_shannon' class-attribute instance-attribute

Section titled “ JENSEN_SHANNON = 'jensen_shannon' class-attribute instance-attribute ”

Jensen-shannon.

SWAP_TEST = 'swap_test' class-attribute instance-attribute

Section titled “ SWAP_TEST = 'swap_test' class-attribute instance-attribute ”

Swap-test.

Bases: StrEnum

Parameter types available in qadence.

FeatureParameters act as input and are not trainable.

Fixed/ constant parameters are neither trainable nor act as input.

VARIATIONAL = 'Variational' class-attribute instance-attribute

Section titled “ VARIATIONAL = 'Variational' class-attribute instance-attribute ”

VariationalParameters are trainable.

Bases: StrEnum

Qubit support types.

Use global qubit support.

Bases: StrEnum

Type of readout protocol.

CORRELATED = 'Correlated Readout' class-attribute instance-attribute

Section titled “ CORRELATED = 'Correlated Readout' class-attribute instance-attribute ”

Using a confusion matrix (2n, 2n) for corrupting bitstrings values.

INDEPENDENT = 'Independent Readout' class-attribute instance-attribute

Section titled “ INDEPENDENT = 'Independent Readout' class-attribute instance-attribute ”

Simple readout protocols where each qubit is corrupted independently.

Bases: StrEnum

Available data types for generating certain results.

Numpy Array Type.

String Type.

Torch Tensor Type.

Bases: StrEnum

Scaling for data reuploads in feature maps.

CONSTANT = 'Constant' class-attribute instance-attribute

Section titled “ CONSTANT = 'Constant' class-attribute instance-attribute ”

Constant scaling.

Exponentially increasing scaling.

Linearly increasing scaling.

Bases: StrEnum

Available serialization formats for circuits.

The Json format.

The PT format used by Torch.

Bases: StrEnum

Methods to generate random states.

HAAR_MEASURE_FAST = 'HaarMeasureFast' class-attribute instance-attribute

Section titled “ HAAR_MEASURE_FAST = 'HaarMeasureFast' class-attribute instance-attribute ”

HaarMeasure.

HAAR_MEASURE_SLOW = 'HaarMeasureSlow' class-attribute instance-attribute

Section titled “ HAAR_MEASURE_SLOW = 'HaarMeasureSlow' class-attribute instance-attribute ”

HaarMeasure non-optimized version.

RANDOM_ROTATIONS = 'RandomRotations' class-attribute instance-attribute

Section titled “ RANDOM_ROTATIONS = 'RandomRotations' class-attribute instance-attribute ”

Random Rotations.

Bases: str, Enum

Used when dumping enum fields in a schema.

Source code in qadence/types.py
65
66
67
68def __str__(self) -> str:
"""Used when dumping enum fields in a schema."""
ret: str = self.value
return ret

Bases: StrEnum

Computing paradigm.

Use the analog paradigm.

Use the banged digital-analog QC paradigm.

Use the digital paradigm.

Use the Rydberg QC paradigm.

Use the step-wise digital-analog QC paradigm.

Bases: StrEnum

Tensor Types for converting blocks to tensors.

Convert a block to a dense tensor.

Convert a observable block to a sparse tensor.

SPARSEDIAGONAL = 'SparseDiagonal' class-attribute instance-attribute

Section titled “ SPARSEDIAGONAL = 'SparseDiagonal' class-attribute instance-attribute ”

Convert a diagonal observable block to a sparse diagonal if possible.