cuPauliProp data types#

Opaque Handle Types#

cupaulipropHandle_t#

typedef void *cupaulipropHandle_t#

Opaque data structure holding the library context (context handle).

Context handle holds the library context (device properties, system information, etc.). A context handle must be initialized prior and destroyed after any other library API call using the cupaulipropCreate and cupaulipropDestroy API functions, respectively.


cupaulipropWorkspaceDescriptor_t#

typedef void *cupaulipropWorkspaceDescriptor_t#

Opaque data structure describing a workspace memory buffer.


cupaulipropPauliExpansion_t#

typedef void *cupaulipropPauliExpansion_t#

Opaque data structure representing a Pauli operator expansion, that is, a linear combination of Pauli operator terms.


cupaulipropPauliExpansionView_t#

typedef void *cupaulipropPauliExpansionView_t#

Opaque data structure describing a subset of Pauli operator terms (view) inside a Pauli operator expansion.


cupaulipropQuantumOperator_t#

typedef void *cupaulipropQuantumOperator_t#

Opaque data structure representing a quantum operator which includes quantum gates and quantum channels.


Status and Enumerations#

cupaulipropStatus_t#

enum cupaulipropStatus_t#

Return status of the library API functions.

All library API functions return a status which can take one of the following values.

Values:

enumerator CUPAULIPROP_STATUS_SUCCESS = 0#

The operation has completed successfully.

enumerator CUPAULIPROP_STATUS_NOT_INITIALIZED = 1#

The library is not initialized.

enumerator CUPAULIPROP_STATUS_INVALID_VALUE = 2#

An invalid parameter value was passed to a function (normally indicates a user mistake).

enumerator CUPAULIPROP_STATUS_INTERNAL_ERROR = 3#

An internal library error.

enumerator CUPAULIPROP_STATUS_NOT_SUPPORTED = 4#

The requested operation is not supported by the library.

enumerator CUPAULIPROP_STATUS_CUDA_ERROR = 5#

A CUDA error (runtime or any CUDA library).

enumerator CUPAULIPROP_STATUS_DISTRIBUTED_FAILURE = 6#

Distributed communication service failure.


cupaulipropComputeType_t#

enum cupaulipropComputeType_t#

Supported compute types.

Values:

enumerator CUPAULIPROP_COMPUTE_32F = (1U << 2U)#

single-precision floating-point compute type

enumerator CUPAULIPROP_COMPUTE_64F = (1U << 4U)#

double-precision floating-point compute type


cupaulipropMemspace_t#

enum cupaulipropMemspace_t#

Memory spaces for workspace buffer allocation.

Values:

enumerator CUPAULIPROP_MEMSPACE_DEVICE = 0#

Device memory space (GPU)

enumerator CUPAULIPROP_MEMSPACE_HOST = 1#

Host memory space (CPU)


cupaulipropWorkspaceKind_t#

enum cupaulipropWorkspaceKind_t#

Kinds of workspace memory buffers.

Values:

enumerator CUPAULIPROP_WORKSPACE_SCRATCH = 0#

Scratch workspace memory.


cupaulipropTruncationStrategyKind_t#

enum cupaulipropTruncationStrategyKind_t#

Pauli operator expansion truncation strategies.

Values:

enumerator CUPAULIPROP_TRUNCATION_STRATEGY_COEFFICIENT_BASED = 0#

Coefficient-based truncation strategy.

enumerator CUPAULIPROP_TRUNCATION_STRATEGY_PAULI_WEIGHT_BASED = 1#

Pauli weight-based truncation strategy.


cupaulipropPauliKind_t#

enum cupaulipropPauliKind_t#

Pauli operators.

Values:

enumerator CUPAULIPROP_PAULI_I = 0#

Identity operator.

enumerator CUPAULIPROP_PAULI_X = 1#

Pauli-X operator.

enumerator CUPAULIPROP_PAULI_Z = 2#

Pauli-Z operator.

enumerator CUPAULIPROP_PAULI_Y = 3#

Pauli-Y operator.


cupaulipropCliffordGateKind_t#

enum cupaulipropCliffordGateKind_t#

Clifford gates.

Values:

enumerator CUPAULIPROP_CLIFFORD_GATE_I = 0#

Identity gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_X = 1#

Pauli-X gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_Z = 2#

Pauli-Z gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_Y = 3#

Pauli-Y gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_H = 4#

Hadamard gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_S = 5#

Phase gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_CX = 7#

CX (CNOT) gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_CZ = 8#

CZ gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_CY = 9#

CY gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_SWAP = 10#

SWAP gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_ISWAP = 11#

iSWAP gate

enumerator CUPAULIPROP_CLIFFORD_GATE_SQRTX = 12#

Sqrt X gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_SQRTZ = 13#

Sqrt Z gate.

enumerator CUPAULIPROP_CLIFFORD_GATE_SQRTY = 14#

Sqrt Y gate.


cupaulipropQuantumOperatorKind_t#

enum cupaulipropQuantumOperatorKind_t#

Kinds of quantum operators.

Values:

enumerator CUPAULIPROP_EXPANSION_KIND_PAULI_ROTATION_GATE = 0#
enumerator CUPAULIPROP_EXPANSION_KIND_CLIFFORD_GATE = 1#
enumerator CUPAULIPROP_EXPANSION_KIND_PAULI_NOISE_CHANNEL = 2#

Data Structures and Integer Types#

cupaulipropPackedIntegerType_t#

typedef uint64_t cupaulipropPackedIntegerType_t#

Type of packed integer for representing Pauli operator terms.


cupaulipropPauliTerm_t#

struct cupaulipropPauliTerm_t#

Explicit data structure specifying a Pauli operator term, that is, a single Pauli string in a Pauli expansion.

A Pauli operator term is a single Pauli string in a Pauli expansion. It is represented by two non-owning pointers into the array containing the Pauli string (X and Z bits) and into the array containing the coefficients respectively. The length of the xzbits array element containing the packed Pauli string is equal to twice the number of qubits divided by the number of bits in the packed integer type cupaulipropPackedIntegerType_t.

Public Members

const cupaulipropPackedIntegerType_t *xzbits#

non-owning pointer to the packed X and Z bits arranged as an array of cupaulipropPackedIntegerType_t

const void *coef#

non-owning pointer to the coefficient (real/complex float/double)


cupaulipropCoefficientTruncationParams_t#

struct cupaulipropCoefficientTruncationParams_t#

Explicit data structure specifying parameters for the coefficient-based truncation strategy.

The coefficient-based truncation strategy truncates the Pauli operator expansion based on the coefficients of the Pauli operator terms. Terms in the Pauli operator expansion with coefficients of magnitude equal or less than the cutoff value are truncated.

Public Members

double cutoff#

cutoff value for the magnitude of the Pauli term’s coefficient


cupaulipropPauliWeightTruncationParams_t#

struct cupaulipropPauliWeightTruncationParams_t#

Explicit data structure specifying parameters for the Pauli weight-based truncation strategy.

The Pauli weight-based truncation strategy truncates the Pauli operator expansion based on the Pauli weight, that is, the number of non-identity Paulis in the Pauli string. Terms in the Pauli operator expansion with Pauli weight greater than the cutoff value are truncated.

Public Members

int32_t cutoff#

cutoff value for the number of non-identity Paulis in the Pauli string


cupaulipropTruncationStrategy_t#

struct cupaulipropTruncationStrategy_t#

Explicit data structure specifying a truncation strategy.

A truncation strategy is a combination of a strategy kind and a parameter structure. The parameter structure is a pointer to a struct containing the parameters for the truncation strategy. Each kind of truncation strategy has its own explicit data structure for its parameters.

Public Members

cupaulipropTruncationStrategyKind_t strategy#

which kind of truncation strategy to apply

void *paramStruct#

pointer to the parameter structure for the truncation strategy