#[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
Auto Trait Implementations
impl RefUnwindSafe for Qureg
impl !Send for Qureg
impl !Sync for Qureg
impl Unpin for Qureg
impl UnwindSafe for Qureg
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more