#[repr(C)]
pub struct Qureg {
Show 13 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 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_int

! Whether this instance is a density-state representation

numQubitsRepresented: c_int

! The number of qubits represented in either the state-vector or density matrix

numQubitsInStateVec: c_int

! Number of qubits in the state-vector - this is double the number represented for mixed states

numAmpsPerChunk: c_longlong

! Number of probability amplitudes held in stateVec by this process ! In the non-MPI version, this is the total number of amplitudes

numAmpsTotal: c_longlong

! Total number of amplitudes, which are possibly distributed among machines

chunkId: c_int

! The position of the chunk of the state vector held by this process in the full state vector

numChunks: c_int

! Number of chunks the state vector is broken up into – the number of MPI processes used

stateVec: ComplexArray

! Computational state amplitudes - a subset thereof in the MPI version

pairStateVec: ComplexArray

! Temporary storage for a chunk of the state vector received from another process in the MPI version

deviceStateVec: ComplexArray

! Storage for wavefunction amplitudes in the GPU version

firstLevelReduction: *mut f64

! Storage for reduction of probabilities on GPU

secondLevelReduction: *mut f64

! Storage for reduction of probabilities on GPU

qasmLog: *mut QASMLogger

! Storage for generated QASM output

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.