#[repr(C)]pub struct Qureg {Show 16 fields
pub isDensityMatrix: c_int,
pub numQubitsRepresented: c_int,
pub numQubitsInStateVec: c_int,
pub numAmpsPerChunk: c_longlong,
pub numAmpsTotal: c_longlong,
pub chunkId: c_int,
pub numChunks: c_int,
pub stateVec: ComplexArray,
pub pairStateVec: ComplexArray,
pub deviceStateVec: ComplexArray,
pub firstLevelReduction: *mut f64,
pub secondLevelReduction: *mut f64,
pub cuStateVec: *mut c_void,
pub deviceCuStateVec: *mut c_void,
pub cuConfig: *mut *mut c_void,
pub qasmLog: *mut QASMLogger,
}Expand description
Represents a system of qubits. Qubits are zero-based
@ingroup type @author Ania Brown @author Tyson Jones (density matrix)
Fields§
§isDensityMatrix: c_intWhether this instance is a density-state representation
numQubitsRepresented: c_intThe number of qubits represented in either the state-vector or density matrix
numQubitsInStateVec: c_intNumber of qubits in the state-vector - this is double the number represented for mixed states
numAmpsPerChunk: c_longlongNumber of probability amplitudes held in stateVec by this process ! In the non-MPI version, this is the total number of amplitudes
numAmpsTotal: c_longlongTotal number of amplitudes, which are possibly distributed among machines
chunkId: c_intThe position of the chunk of the state vector held by this process in the full state vector
numChunks: c_intNumber of chunks the state vector is broken up into – the number of MPI processes used
stateVec: ComplexArrayComputational state amplitudes - a subset thereof in the MPI version
pairStateVec: ComplexArrayTemporary storage for a chunk of the state vector received from another process in the MPI version
deviceStateVec: ComplexArrayStorage for wavefunction amplitudes in the GPU version
firstLevelReduction: *mut f64Storage for reduction of probabilities on GPU
secondLevelReduction: *mut f64Storage for reduction of probabilities on GPU
cuStateVec: *mut c_voidStorage for wavefunction amplitues and config (copy of QuESTEnv’s handle) in cuQuantum deployment
deviceCuStateVec: *mut c_void§cuConfig: *mut *mut c_void§qasmLog: *mut QASMLoggerStorage for generated QASM output