cuStabilizer data types#
Opaque Handle Types#
-
typedef void *custabilizerHandle_t#
Opaque data structure holding the library context.
Status and Enumerations#
-
enum custabilizerStatus_t#
Status codes returned by the cuStabilizer library.
Values:
-
enumerator CUSTABILIZER_STATUS_SUCCESS = 0#
The operation has completed successfully.
-
enumerator CUSTABILIZER_STATUS_ERROR = 1#
Unspecified failure.
-
enumerator CUSTABILIZER_STATUS_NOT_INITIALIZED = 2#
cuStabilizer is not initialized.
-
enumerator CUSTABILIZER_STATUS_INVALID_VALUE = 3#
One or more arguments are invalid.
-
enumerator CUSTABILIZER_STATUS_NOT_SUPPORTED = 4#
Operation or feature is not supported.
-
enumerator CUSTABILIZER_STATUS_ALLOC_FAILED = 5#
Device memory allocation failed.
-
enumerator CUSTABILIZER_STATUS_INTERNAL_ERROR = 6#
Internal error occurred.
-
enumerator CUSTABILIZER_STATUS_INSUFFICIENT_WORKSPACE = 7#
Insufficient workspace provided.
-
enumerator CUSTABILIZER_STATUS_CUDA_ERROR = 8#
CUDA error occurred.
-
enumerator CUSTABILIZER_STATUS_INSUFFICIENT_SPARSE_STORAGE = 9#
Insufficient storage for sparse output; resize and retry.
-
enumerator CUSTABILIZER_STATUS_SUCCESS = 0#
-
enum custabilizerCircuitAttributes_t#
Read-only structural attributes of a custabilizerCircuit_t.
Each attribute is written into a caller-owned host buffer whose size must match the attribute’s value type. Current attributes use a host
int64_t(booleans as 0 or 1).Values:
-
enumerator CUSTABILIZER_CIRCUIT_NUM_QUBITS = 0#
Number of qubits = max qubit index + 1 (0 for an empty circuit).
-
enumerator CUSTABILIZER_CIRCUIT_NUM_MEASUREMENT_GATES = 1#
Number of M/MX/MY/MR* gates.
-
enumerator CUSTABILIZER_CIRCUIT_NUM_DETECTORS = 2#
Number of DETECTOR instructions (one per instruction).
-
enumerator CUSTABILIZER_CIRCUIT_NUM_REPEAT_BLOCKS = 3#
Number of REPEAT blocks across all nesting levels.
-
enumerator CUSTABILIZER_CIRCUIT_NUM_RESETS = 4#
Total reset operations, per target.
-
enumerator CUSTABILIZER_CIRCUIT_NUM_1Q_GATES = 5#
Number of single-qubit Clifford gates (one per target).
-
enumerator CUSTABILIZER_CIRCUIT_NUM_2Q_GATES = 6#
Number of two-qubit Clifford gates (one per control-target pair).
-
enumerator CUSTABILIZER_CIRCUIT_HAS_NOISE = 7#
1 if any noise/error or leakage instruction is present, else 0.
-
enumerator CUSTABILIZER_CIRCUIT_NUM_LEAKAGE_INSTRUCTIONS = 8#
Total leakage instructions across all blocks.
-
enumerator CUSTABILIZER_CIRCUIT_NUM_LEAKAGE_READOUTS = 9#
Number of herald leakage readouts (HERALD_LEAKAGE_EVENT targets).
-
enumerator CUSTABILIZER_CIRCUIT_NUM_MEASUREMENT_BITS = 10#
Measurement bits per shot = M/MX/MY/MR* targets + HERALD_LEAKAGE_EVENT targets; pass this as
numMeasurementswhen creating any FrameSimulator.
-
enumerator CUSTABILIZER_CIRCUIT_NUM_QUBITS = 0#
Data Structures and Integer Types#
-
typedef uint32_t custabilizerBitInt_t#
Integer type for specifying bit-packed tables.