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...
 
CuQuantumConfig * cuConfig
 
cuAmp * cuStateVec
 Storage for wavefunction amplitues and config (copy of QuESTEnv's handle) in cuQuantum deployment. More...
 
cuAmp * deviceCuStateVec
 
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)

Field Documentation

◆ chunkId

int Qureg::chunkId

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

Referenced by areEqual(), reportQuregParams(), reportState(), and toQureg().

◆ cuConfig

CuQuantumConfig* Qureg::cuConfig

◆ cuStateVec

cuAmp* Qureg::cuStateVec

Storage for wavefunction amplitues and config (copy of QuESTEnv's handle) in cuQuantum deployment.

◆ deviceCuStateVec

cuAmp* Qureg::deviceCuStateVec

◆ deviceStateVec

ComplexArray Qureg::deviceStateVec

Storage for wavefunction amplitudes in the GPU version.

Referenced by copyStateFromGPU(), and copyStateToGPU().

◆ firstLevelReduction

qreal* Qureg::firstLevelReduction

Storage for reduction of probabilities on GPU.

◆ isDensityMatrix

int Qureg::isDensityMatrix

Whether this instance is a density-state representation.

Referenced by applyDiagonalOp(), applyGateMatrixN(), applyGateSubDiagonalOp(), applyMultiControlledGateMatrixN(), applyMultiVarPhaseFunc(), applyMultiVarPhaseFuncOverrides(), applyNamedPhaseFunc(), applyNamedPhaseFuncOverrides(), applyParamNamedPhaseFunc(), applyParamNamedPhaseFuncOverrides(), applyPhaseFunc(), applyPhaseFuncOverrides(), applyProjector(), areEqual(), assertQuregAndRefInDebugState(), calcExpecDiagonalOp(), calcFidelity(), calcProbOfAllOutcomes(), calcProbOfOutcome(), calcTotalProb(), collapseToOutcome(), compactUnitary(), controlledCompactUnitary(), controlledMultiQubitUnitary(), controlledNot(), controlledPauliY(), controlledPhaseFlip(), controlledPhaseShift(), controlledRotateAroundAxis(), controlledRotateX(), controlledRotateY(), controlledRotateZ(), controlledTwoQubitUnitary(), controlledUnitary(), createCloneQureg(), createDensityQureg(), createQureg(), diagonalUnitary(), hadamard(), initClassicalState(), initPlusState(), initPureState(), measure(), measureWithStats(), multiControlledMultiQubitNot(), multiControlledMultiQubitUnitary(), multiControlledMultiRotatePauli(), multiControlledMultiRotateZ(), multiControlledPhaseFlip(), multiControlledPhaseShift(), multiControlledTwoQubitUnitary(), multiControlledUnitary(), multiQubitNot(), multiQubitUnitary(), multiRotatePauli(), multiRotateZ(), multiStateControlledUnitary(), pauliX(), pauliY(), pauliZ(), phaseShift(), rotateAroundAxis(), rotateX(), rotateY(), rotateZ(), sGate(), sqrtSwapGate(), swapGate(), TEST_CASE(), tGate(), toQMatrix(), toQureg(), toQVector(), twoQubitUnitary(), and unitary().

◆ 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.

Referenced by areEqual(), copyStateFromGPU(), copyStateToGPU(), reportState(), TEST_CASE(), toQMatrix(), toQureg(), and toQVector().

◆ numAmpsTotal

long long int Qureg::numAmpsTotal

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

Referenced by areEqual(), assertQuregAndRefInDebugState(), copyStateFromGPU(), copyStateToGPU(), getNumAmps(), initStateFromAmps(), TEST_CASE(), toQMatrix(), toQureg(), and toQVector().

◆ numChunks

int Qureg::numChunks

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

Referenced by reportQuregParams().

◆ numQubitsInStateVec

int Qureg::numQubitsInStateVec

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

Referenced by createCloneQureg(), createDensityQureg(), createQureg(), reportQuregParams(), and TEST_CASE().

◆ numQubitsRepresented

int Qureg::numQubitsRepresented

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

Referenced by applyFullQFT(), applyGateMatrixN(), applyGateSubDiagonalOp(), applyMultiControlledGateMatrixN(), applyMultiVarPhaseFunc(), applyMultiVarPhaseFuncOverrides(), applyNamedPhaseFunc(), applyNamedPhaseFuncOverrides(), applyParamNamedPhaseFunc(), applyParamNamedPhaseFuncOverrides(), applyPauliSum(), applyPhaseFunc(), applyPhaseFuncOverrides(), assertQuregAndRefInDebugState(), calcExpecPauliSum(), compactUnitary(), controlledCompactUnitary(), controlledMultiQubitUnitary(), controlledNot(), controlledPauliY(), controlledPhaseFlip(), controlledPhaseShift(), controlledRotateAroundAxis(), controlledRotateX(), controlledRotateY(), controlledRotateZ(), controlledTwoQubitUnitary(), controlledUnitary(), createCloneQureg(), createDensityQureg(), createQureg(), diagonalUnitary(), getDensityAmp(), getNumQubits(), hadamard(), multiControlledMultiQubitNot(), multiControlledMultiQubitUnitary(), multiControlledMultiRotatePauli(), multiControlledMultiRotateZ(), multiControlledPhaseFlip(), multiControlledPhaseShift(), multiControlledTwoQubitUnitary(), multiControlledUnitary(), multiQubitNot(), multiQubitUnitary(), multiRotatePauli(), multiRotateZ(), multiStateControlledUnitary(), pauliX(), pauliY(), pauliZ(), phaseShift(), rotateAroundAxis(), rotateX(), rotateY(), rotateZ(), setDensityAmps(), sGate(), sqrtSwapGate(), swapGate(), TEST_CASE(), tGate(), toQMatrix(), toQureg(), twoQubitUnitary(), and unitary().

◆ pairStateVec

ComplexArray Qureg::pairStateVec

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

◆ qasmLog

QASMLogger* Qureg::qasmLog

Storage for generated QASM output.

◆ secondLevelReduction

qreal * Qureg::secondLevelReduction

◆ stateVec

ComplexArray Qureg::stateVec

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

Referenced by areEqual(), copyStateFromGPU(), copyStateToGPU(), reportState(), TEST_CASE(), toQMatrix(), toQureg(), and toQVector().


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