Qureg Struct Reference

Represents a system of qubits. More...

#include <QuEST.h>

Data Fields

int chunkId
 The position of the chunk of the state vector held by this process in the full state vector. More...
 
ComplexArray deviceStateVec
 Storage for wavefunction amplitudes in the GPU version. More...
 
qrealfirstLevelReduction
 Storage for reduction of probabilities on GPU. More...
 
int isDensityMatrix
 Whether this instance is a density-state representation. More...
 
long long int numAmpsPerChunk
 Number of probability amplitudes held in stateVec by this process In the non-MPI version, this is the total number of amplitudes. More...
 
long long int numAmpsTotal
 Total number of amplitudes, which are possibly distributed among machines. More...
 
int numChunks
 Number of chunks the state vector is broken up into – the number of MPI processes used. More...
 
int numQubitsInStateVec
 Number of qubits in the state-vector - this is double the number represented for mixed states. More...
 
int numQubitsRepresented
 The number of qubits represented in either the state-vector or density matrix. More...
 
ComplexArray pairStateVec
 Temporary storage for a chunk of the state vector received from another process in the MPI version. More...
 
QASMLogger * qasmLog
 Storage for generated QASM output. More...
 
qrealsecondLevelReduction
 
ComplexArray stateVec
 Computational state amplitudes - a subset thereof in the MPI version. More...
 

Detailed Description

Represents a system of qubits.

Qubits are zero-based

Author
Ania Brown
Tyson Jones (density matrix)

Definition at line 203 of file QuEST.h.

Field Documentation

◆ chunkId

int Qureg::chunkId

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

Definition at line 217 of file QuEST.h.

Referenced by areEqual(), compressPairVectorForSingleQubitDepolarise(), compressPairVectorForTwoQubitDepolarise(), copyDiagOpIntoMatrixPairState(), copyVecIntoMatrixPairState(), densmatr_calcExpecDiagonalOpLocal(), densmatr_calcFidelityLocal(), densmatr_calcTotalProb(), densmatr_collapseToKnownProbOutcome(), densmatr_findProbabilityOfZeroLocal(), densmatr_initClassicalState(), densmatr_initPureStateLocal(), densmatr_mixDamping(), densmatr_mixDampingDistributed(), densmatr_mixDampingLocal(), densmatr_mixDepolarising(), densmatr_mixDepolarisingDistributed(), densmatr_mixDepolarisingLocal(), densmatr_mixTwoQubitDephasing(), densmatr_mixTwoQubitDepolarising(), densmatr_mixTwoQubitDepolarisingDistributed(), densmatr_mixTwoQubitDepolarisingLocal(), densmatr_mixTwoQubitDepolarisingLocalPart1(), densmatr_mixTwoQubitDepolarisingQ1LocalQ2DistributedPart3(), densmatr_oneQubitDegradeOffDiagonal(), getGlobalIndOfOddParityInChunk(), reportQuregParams(), reportState(), statevec_calcProbOfOutcome(), statevec_collapseToKnownProbOutcome(), statevec_compactUnitary(), statevec_controlledCompactUnitary(), statevec_controlledCompactUnitaryDistributed(), statevec_controlledCompactUnitaryLocal(), statevec_controlledNot(), statevec_controlledNotDistributed(), statevec_controlledNotLocal(), statevec_controlledPauliY(), statevec_controlledPauliYConj(), statevec_controlledPauliYDistributed(), statevec_controlledPauliYLocal(), statevec_controlledPhaseFlip(), statevec_controlledPhaseShift(), statevec_controlledUnitary(), statevec_controlledUnitaryDistributed(), statevec_controlledUnitaryLocal(), statevec_createQureg(), statevec_getImagAmp(), statevec_getRealAmp(), statevec_hadamard(), statevec_initClassicalState(), statevec_initDebugState(), statevec_initStateFromSingleFile(), statevec_initStateOfSingleQubit(), statevec_initZeroState(), statevec_multiControlledMultiQubitUnitaryLocal(), statevec_multiControlledPhaseFlip(), statevec_multiControlledPhaseShift(), statevec_multiControlledTwoQubitUnitaryLocal(), statevec_multiControlledUnitary(), statevec_multiControlledUnitaryDistributed(), statevec_multiControlledUnitaryLocal(), statevec_multiRotateZ(), statevec_pauliX(), statevec_pauliY(), statevec_pauliYConj(), statevec_phaseShiftByTerm(), statevec_reportStateToScreen(), statevec_setAmps(), statevec_swapQubitAmpsDistributed(), statevec_unitary(), and toQureg().

◆ deviceStateVec

ComplexArray Qureg::deviceStateVec

Storage for wavefunction amplitudes in the GPU version.

Definition at line 227 of file QuEST.h.

Referenced by copyStateFromGPU(), copyStateToGPU(), densmatr_applyDiagonalOpKernel(), densmatr_calcExpecDiagonalOp(), densmatr_calcFidelityKernel(), densmatr_calcHilbertSchmidtDistance(), densmatr_calcInnerProductKernel(), densmatr_calcPurity(), densmatr_collapseToKnownProbOutcome(), densmatr_findProbabilityOfZeroKernel(), densmatr_initClassicalState(), densmatr_initPlusState(), densmatr_initPureState(), densmatr_mixDamping(), densmatr_mixDensityMatrixKernel(), densmatr_mixDepolarising(), densmatr_mixTwoQubitDephasing(), densmatr_mixTwoQubitDepolarising(), densmatr_oneQubitDegradeOffDiagonal(), statevec_applyDiagonalOpKernel(), statevec_calcExpecDiagonalOp(), statevec_calcInnerProduct(), statevec_cloneQureg(), statevec_collapseToKnownProbOutcomeKernel(), statevec_compactUnitaryKernel(), statevec_controlledCompactUnitaryKernel(), statevec_controlledNotKernel(), statevec_controlledPauliYKernel(), statevec_controlledPhaseFlipKernel(), statevec_controlledPhaseShiftKernel(), statevec_controlledUnitaryKernel(), statevec_createQureg(), statevec_destroyQureg(), statevec_findProbabilityOfZeroKernel(), statevec_getImagAmp(), statevec_getRealAmp(), statevec_hadamardKernel(), statevec_initBlankState(), statevec_initClassicalState(), statevec_initDebugState(), statevec_initPlusState(), statevec_initStateOfSingleQubit(), statevec_initZeroState(), statevec_multiControlledMultiQubitUnitaryKernel(), statevec_multiControlledPhaseFlipKernel(), statevec_multiControlledPhaseShiftKernel(), statevec_multiControlledTwoQubitUnitaryKernel(), statevec_multiControlledUnitaryKernel(), statevec_multiRotateZKernel(), statevec_pauliXKernel(), statevec_pauliYKernel(), statevec_phaseShiftByTermKernel(), statevec_setAmps(), statevec_setWeightedQuregKernel(), statevec_swapQubitAmpsKernel(), and statevec_unitaryKernel().

◆ firstLevelReduction

◆ isDensityMatrix

◆ numAmpsPerChunk

long long int Qureg::numAmpsPerChunk

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

Definition at line 213 of file QuEST.h.

Referenced by areEqual(), compressPairVectorForSingleQubitDepolarise(), compressPairVectorForTwoQubitDepolarise(), copyStateFromGPU(), copyStateToGPU(), copyVecIntoMatrixPairState(), densmatr_applyDiagonalOp(), densmatr_applyDiagonalOpKernel(), densmatr_applyDiagonalOpLocal(), densmatr_calcExpecDiagonalOp(), densmatr_calcExpecDiagonalOpLocal(), densmatr_calcFidelityLocal(), densmatr_calcHilbertSchmidtDistance(), densmatr_calcHilbertSchmidtDistanceSquaredLocal(), densmatr_calcInnerProductLocal(), densmatr_calcPurity(), densmatr_calcPurityLocal(), densmatr_calcTotalProb(), densmatr_collapseToKnownProbOutcome(), densmatr_findProbabilityOfZeroLocal(), densmatr_initClassicalState(), densmatr_initPlusState(), densmatr_initPureState(), densmatr_initPureStateLocal(), densmatr_mixDamping(), densmatr_mixDampingDistributed(), densmatr_mixDampingLocal(), densmatr_mixDensityMatrix(), densmatr_mixDepolarising(), densmatr_mixDepolarisingDistributed(), densmatr_mixDepolarisingLocal(), densmatr_mixTwoQubitDephasing(), densmatr_mixTwoQubitDepolarising(), densmatr_mixTwoQubitDepolarisingDistributed(), densmatr_mixTwoQubitDepolarisingLocal(), densmatr_mixTwoQubitDepolarisingLocalPart1(), densmatr_mixTwoQubitDepolarisingQ1LocalQ2DistributedPart3(), densmatr_oneQubitDegradeOffDiagonal(), exchangePairStateVectorHalves(), exchangeStateVectors(), getChunkIdFromIndex(), getGlobalIndOfOddParityInChunk(), reportState(), statevec_applyDiagonalOp(), statevec_applyDiagonalOpKernel(), statevec_calcExpecDiagonalOp(), statevec_calcExpecDiagonalOpLocal(), statevec_calcInnerProduct(), statevec_calcInnerProductLocal(), statevec_calcProbOfOutcome(), statevec_calcTotalProb(), statevec_cloneQureg(), statevec_collapseToKnownProbOutcome(), statevec_collapseToKnownProbOutcomeDistributedRenorm(), statevec_collapseToKnownProbOutcomeKernel(), statevec_collapseToKnownProbOutcomeLocal(), statevec_collapseToOutcomeDistributedSetZero(), statevec_compactUnitary(), statevec_compactUnitaryDistributed(), statevec_compactUnitaryKernel(), statevec_compactUnitaryLocal(), statevec_compareStates(), statevec_controlledCompactUnitary(), statevec_controlledCompactUnitaryDistributed(), statevec_controlledCompactUnitaryKernel(), statevec_controlledCompactUnitaryLocal(), statevec_controlledNot(), statevec_controlledNotDistributed(), statevec_controlledNotKernel(), statevec_controlledNotLocal(), statevec_controlledPauliY(), statevec_controlledPauliYConj(), statevec_controlledPauliYDistributed(), statevec_controlledPauliYKernel(), statevec_controlledPauliYLocal(), statevec_controlledPhaseFlip(), statevec_controlledPhaseFlipKernel(), statevec_controlledPhaseShift(), statevec_controlledPhaseShiftKernel(), statevec_controlledUnitary(), statevec_controlledUnitaryDistributed(), statevec_controlledUnitaryKernel(), statevec_controlledUnitaryLocal(), statevec_createQureg(), statevec_destroyQureg(), statevec_findProbabilityOfZero(), statevec_findProbabilityOfZeroDistributed(), statevec_findProbabilityOfZeroKernel(), statevec_findProbabilityOfZeroLocal(), statevec_getImagAmp(), statevec_getRealAmp(), statevec_hadamard(), statevec_hadamardDistributed(), statevec_hadamardKernel(), statevec_hadamardLocal(), statevec_initBlankState(), statevec_initClassicalState(), statevec_initDebugState(), statevec_initPlusState(), statevec_initStateFromSingleFile(), statevec_initStateOfSingleQubit(), statevec_initZeroState(), statevec_multiControlledMultiQubitUnitary(), statevec_multiControlledMultiQubitUnitaryKernel(), statevec_multiControlledMultiQubitUnitaryLocal(), statevec_multiControlledPhaseFlip(), statevec_multiControlledPhaseFlipKernel(), statevec_multiControlledPhaseShift(), statevec_multiControlledPhaseShiftKernel(), statevec_multiControlledTwoQubitUnitary(), statevec_multiControlledTwoQubitUnitaryKernel(), statevec_multiControlledTwoQubitUnitaryLocal(), statevec_multiControlledUnitary(), statevec_multiControlledUnitaryDistributed(), statevec_multiControlledUnitaryKernel(), statevec_multiControlledUnitaryLocal(), statevec_multiRotateZ(), statevec_multiRotateZKernel(), statevec_pauliX(), statevec_pauliXDistributed(), statevec_pauliXKernel(), statevec_pauliXLocal(), statevec_pauliY(), statevec_pauliYConj(), statevec_pauliYDistributed(), statevec_pauliYKernel(), statevec_pauliYLocal(), statevec_phaseShiftByTerm(), statevec_phaseShiftByTermKernel(), statevec_reportStateToScreen(), statevec_setAmps(), statevec_setWeightedQureg(), statevec_setWeightedQuregKernel(), statevec_swapQubitAmps(), statevec_swapQubitAmpsDistributed(), statevec_swapQubitAmpsKernel(), statevec_swapQubitAmpsLocal(), statevec_unitary(), statevec_unitaryDistributed(), statevec_unitaryKernel(), statevec_unitaryLocal(), TEST_CASE(), toQMatrix(), toQureg(), toQVector(), and validateMultiQubitMatrixFitsInNode().

◆ numAmpsTotal

long long int Qureg::numAmpsTotal

◆ numChunks

◆ numQubitsInStateVec

int Qureg::numQubitsInStateVec

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

Definition at line 210 of file QuEST.h.

Referenced by createCloneQureg(), createDensityQureg(), createQureg(), getEnvironmentString(), reportQuregParams(), statevec_createQureg(), statevec_destroyQureg(), statevec_getEnvironmentString(), statevec_reportStateToScreen(), and TEST_CASE().

◆ numQubitsRepresented

int Qureg::numQubitsRepresented

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

Definition at line 208 of file QuEST.h.

Referenced by applyPauliSum(), calcExpecPauliSum(), compactUnitary(), compressPairVectorForSingleQubitDepolarise(), compressPairVectorForTwoQubitDepolarise(), controlledCompactUnitary(), controlledMultiQubitUnitary(), controlledNot(), controlledPauliY(), controlledPhaseFlip(), controlledPhaseShift(), controlledRotateAroundAxis(), controlledRotateX(), controlledRotateY(), controlledRotateZ(), controlledTwoQubitUnitary(), controlledUnitary(), createCloneQureg(), createDensityQureg(), createQureg(), densmatr_applyKrausSuperoperator(), densmatr_applyMultiQubitKrausSuperoperator(), densmatr_applyTwoQubitKrausSuperoperator(), densmatr_calcExpecDiagonalOpLocal(), densmatr_calcFidelity(), densmatr_calcTotalProb(), densmatr_collapseToKnownProbOutcome(), densmatr_findProbabilityOfZero(), densmatr_findProbabilityOfZeroKernel(), densmatr_findProbabilityOfZeroLocal(), densmatr_initClassicalState(), densmatr_initPlusState(), densmatr_mixDamping(), densmatr_mixDampingDistributed(), densmatr_mixDampingLocal(), densmatr_mixDepolarising(), densmatr_mixDepolarisingDistributed(), densmatr_mixDepolarisingLocal(), densmatr_mixTwoQubitDephasing(), densmatr_mixTwoQubitDepolarising(), densmatr_mixTwoQubitDepolarisingDistributed(), densmatr_mixTwoQubitDepolarisingLocal(), densmatr_mixTwoQubitDepolarisingLocalPart1(), densmatr_mixTwoQubitDepolarisingQ1LocalQ2DistributedPart3(), densmatr_oneQubitDegradeOffDiagonal(), getDensityAmp(), getNumQubits(), hadamard(), multiControlledMultiQubitUnitary(), multiControlledPhaseFlip(), multiControlledPhaseShift(), multiControlledTwoQubitUnitary(), multiControlledUnitary(), multiQubitUnitary(), multiRotatePauli(), multiRotateZ(), multiStateControlledUnitary(), pauliX(), pauliY(), pauliZ(), phaseShift(), qasm_recordInitClassical(), qasm_setup(), rotateAroundAxis(), rotateX(), rotateY(), rotateZ(), sGate(), sqrtSwapGate(), statevec_applyPauliSum(), statevec_calcExpecPauliSum(), swapGate(), TEST_CASE(), tGate(), toQMatrix(), toQureg(), twoQubitUnitary(), unitary(), validateAmpIndex(), validateControl(), validateDiagonalOp(), validateMatchingQuregDims(), validateMatchingQuregPauliHamilDims(), validateMultiQubits(), validateNumControls(), validateNumTargets(), validateStateIndex(), and validateTarget().

◆ pairStateVec

◆ qasmLog

◆ secondLevelReduction

◆ stateVec

ComplexArray Qureg::stateVec

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

Definition at line 222 of file QuEST.h.

Referenced by areEqual(), compressPairVectorForSingleQubitDepolarise(), compressPairVectorForTwoQubitDepolarise(), copyStateFromGPU(), copyStateToGPU(), copyVecIntoMatrixPairState(), densmatr_applyDiagonalOpLocal(), densmatr_calcExpecDiagonalOpLocal(), densmatr_calcFidelity(), densmatr_calcFidelityLocal(), densmatr_calcHilbertSchmidtDistanceSquaredLocal(), densmatr_calcInnerProductLocal(), densmatr_calcPurityLocal(), densmatr_calcTotalProb(), densmatr_findProbabilityOfZeroLocal(), densmatr_initClassicalState(), densmatr_initPlusState(), densmatr_initPureState(), densmatr_initPureStateLocal(), densmatr_mixDampingDistributed(), densmatr_mixDampingLocal(), densmatr_mixDensityMatrix(), densmatr_mixDepolarisingDistributed(), densmatr_mixDepolarisingLocal(), densmatr_mixTwoQubitDephasing(), densmatr_mixTwoQubitDepolarisingDistributed(), densmatr_mixTwoQubitDepolarisingLocal(), densmatr_mixTwoQubitDepolarisingLocalPart1(), densmatr_mixTwoQubitDepolarisingQ1LocalQ2DistributedPart3(), densmatr_oneQubitDegradeOffDiagonal(), exchangeStateVectors(), normaliseSomeAmps(), reportState(), statevec_applyDiagonalOp(), statevec_calcExpecDiagonalOpLocal(), statevec_calcInnerProductLocal(), statevec_calcTotalProb(), statevec_cloneQureg(), statevec_collapseToKnownProbOutcomeDistributedRenorm(), statevec_collapseToKnownProbOutcomeLocal(), statevec_collapseToOutcomeDistributedSetZero(), statevec_compactUnitary(), statevec_compactUnitaryLocal(), statevec_compareStates(), statevec_controlledCompactUnitary(), statevec_controlledCompactUnitaryLocal(), statevec_controlledNot(), statevec_controlledNotLocal(), statevec_controlledPauliY(), statevec_controlledPauliYConj(), statevec_controlledPauliYLocal(), statevec_controlledPhaseFlip(), statevec_controlledPhaseShift(), statevec_controlledUnitary(), statevec_controlledUnitaryLocal(), statevec_createQureg(), statevec_destroyQureg(), statevec_findProbabilityOfZeroDistributed(), statevec_findProbabilityOfZeroLocal(), statevec_getImagAmp(), statevec_getRealAmp(), statevec_hadamard(), statevec_hadamardLocal(), statevec_initBlankState(), statevec_initClassicalState(), statevec_initDebugState(), statevec_initPlusState(), statevec_initStateFromSingleFile(), statevec_initStateOfSingleQubit(), statevec_initZeroState(), statevec_multiControlledMultiQubitUnitaryLocal(), statevec_multiControlledPhaseFlip(), statevec_multiControlledPhaseShift(), statevec_multiControlledTwoQubitUnitaryLocal(), statevec_multiControlledUnitary(), statevec_multiControlledUnitaryLocal(), statevec_multiRotateZ(), statevec_pauliX(), statevec_pauliXLocal(), statevec_pauliY(), statevec_pauliYConj(), statevec_pauliYLocal(), statevec_phaseShiftByTerm(), statevec_reportStateToScreen(), statevec_setAmps(), statevec_setWeightedQureg(), statevec_swapQubitAmpsDistributed(), statevec_swapQubitAmpsLocal(), statevec_unitary(), statevec_unitaryLocal(), TEST_CASE(), toQMatrix(), toQureg(), toQVector(), and zeroSomeAmps().


The documentation for this struct was generated from the following file: