QuEST_validation.h
Go to the documentation of this file.
1 // Distributed under MIT licence. See https://github.com/QuEST-Kit/QuEST/blob/master/LICENCE.txt for details
41 void validateMultiTargets(Qureg qurge, int* targetQubits, int numTargetQubits, const char* caller);
43 void validateMultiControls(Qureg qureg, int* controlQubits, int numControlQubits, const char* caller);
45 void validateMultiControlsTarget(Qureg qureg, int* controlQubits, int numControlQubits, int targetQubit, const char* caller);
47 void validateMultiControlsMultiTargets(Qureg qureg, int* controlQubits, int numControlQubits, int* targetQubits, int numTargetQubits, const char* caller);
57 void validateMultiQubitUnitaryMatrix(Qureg qureg, ComplexMatrixN u, int numTargs, const char* caller);
79 void validateNumAmps(Qureg qureg, long long int startInd, long long int numAmps, const char* caller);
103 void validateOneQubitKrausMap(Qureg qureg, ComplexMatrix2* ops, int numOps, const char* caller);
105 void validateTwoQubitKrausMap(Qureg qureg, ComplexMatrix4* ops, int numOps, const char* caller);
107 void validateMultiQubitKrausMap(Qureg qureg, int numTargs, ComplexMatrixN* ops, int numOps, const char* caller);
117 void validateHamilFileParams(int numQubits, int numTerms, FILE* file, char* fn, const char* caller);
119 void validateHamilFileCoeffParsed(int parsed, PauliHamil h, FILE* file, char* fn, const char* caller);
121 void validateHamilFilePauliParsed(int parsed, PauliHamil h, FILE* file, char* fn, const char* caller);
123 void validateHamilFilePauliCode(enum pauliOpType code, PauliHamil h, FILE* file, char* fn, const char* caller);
135 void validateNumElems(DiagonalOp op, long long int startInd, long long int numElems, const char* caller);
137 void validateQubitSubregs(Qureg qureg, int* qubits, int* numQubitsPerReg, const int numReg, const char* caller);
139 void validatePhaseFuncOverrides(const int numQubits, enum bitEncoding encoding, long long int* overrideInds, int numOverrides, const char* caller);
141 void validateMultiVarPhaseFuncOverrides(int* numQubitsPerReg, const int numRegs, enum bitEncoding encoding, long long int* overrideInds, int numOverrides, const char* caller);
143 void validatePhaseFuncTerms(int numQubits, enum bitEncoding encoding, qreal* coeffs, qreal* exponents, int numTerms, long long int* overrideInds, int numOverrides, const char* caller);
145 void validateMultiVarPhaseFuncTerms(int* numQubitsPerReg, int numRegs, enum bitEncoding encoding, qreal* exponents, int* numTermsPerReg, const char* caller);
147 void validatePhaseFuncName(enum phaseFunc funcCode, int numRegs, int numParams, const char* caller);
151 void validateMultiRegBitEncoding(int* numQubitsPerReg, int numRegs, enum bitEncoding encoding, const char* caller);
void validateOneQubitDephaseProb(qreal prob, const char *caller)
Definition: QuEST_validation.c:563
void validateNumPauliSumTerms(int numTerms, const char *caller)
Definition: QuEST_validation.c:606
void validateMatchingQuregDims(Qureg qureg1, Qureg qureg2, const char *caller)
Definition: QuEST_validation.c:531
void validateMatchingQuregPauliHamilDims(Qureg qureg, PauliHamil hamil, const char *caller)
Definition: QuEST_validation.c:660
void validateAmpIndex(Qureg qureg, long long int ampInd, const char *caller)
Definition: QuEST_validation.c:382
void validateHamilParams(int numQubits, int numTerms, const char *caller)
Definition: QuEST_validation.c:651
void validateSecondQuregStateVec(Qureg qureg2, const char *caller)
Definition: QuEST_validation.c:539
void validateTwoQubitDephaseProb(qreal prob, const char *caller)
Definition: QuEST_validation.c:568
void validateMultiVarPhaseFuncTerms(int *numQubitsPerReg, int numRegs, enum bitEncoding encoding, qreal *exponents, int *numTermsPerReg, const char *caller)
Definition: QuEST_validation.c:836
void validateDiagPauliHamil(DiagonalOp op, PauliHamil hamil, const char *caller)
Definition: QuEST_validation.c:718
void validateControlTarget(Qureg qureg, int controlQubit, int targetQubit, const char *caller)
Definition: QuEST_validation.c:408
void validateDiagonalOp(Qureg qureg, DiagonalOp op, const char *caller)
Definition: QuEST_validation.c:713
void validateOneQubitDepolProb(qreal prob, const char *caller)
Definition: QuEST_validation.c:573
void validateQubitSubregs(Qureg qureg, int *qubits, int *numQubitsPerReg, const int numReg, const char *caller)
Definition: QuEST_validation.c:757
void validatePhaseFuncOverrides(const int numQubits, enum bitEncoding encoding, long long int *overrideInds, int numOverrides, const char *caller)
Definition: QuEST_validation.c:862
void validateMultiControlsTarget(Qureg qureg, int *controlQubits, int numControlQubits, int targetQubit, const char *caller)
Definition: QuEST_validation.c:452
void validateNumQubitsInDiagOp(int numQubits, int numRanks, const char *caller)
Definition: QuEST_validation.c:365
void validateStateIndex(Qureg qureg, long long int stateInd, const char *caller)
Definition: QuEST_validation.c:377
void validateNumQubitsInMatrix(int numQubits, const char *caller)
Definition: QuEST_validation.c:361
void validateNumRanks(int numRanks, const char *caller)
Definition: QuEST_validation.c:335
void validatePhaseFuncName(enum phaseFunc funcCode, int numRegs, int numParams, const char *caller)
Definition: QuEST_validation.c:913
void validateHamilFilePauliCode(enum pauliOpType code, PauliHamil h, FILE *file, char *fn, const char *caller)
Definition: QuEST_validation.c:693
void validateStateVecQureg(Qureg qureg, const char *caller)
Definition: QuEST_validation.c:515
void validateMultiQubitMatrixFitsInNode(Qureg qureg, int numTargets, const char *caller)
Definition: QuEST_validation.c:473
void validateHamilFileCoeffParsed(int parsed, PauliHamil h, FILE *file, char *fn, const char *caller)
Definition: QuEST_validation.c:673
void validateOneQubitKrausMap(Qureg qureg, ComplexMatrix2 *ops, int numOps, const char *caller)
Definition: QuEST_validation.c:610
void validateUniqueTargets(Qureg qureg, int qubit1, int qubit2, const char *caller)
Definition: QuEST_validation.c:414
void validateOneQubitPauliProbs(qreal probX, qreal probY, qreal probZ, const char *caller)
Definition: QuEST_validation.c:588
void validateDiagPauliHamilFromFile(PauliHamil h, int numRanks, const char *caller)
Definition: QuEST_validation.c:727
void validateNumQubitsInQureg(int numQubits, int numRanks, const char *caller)
Definition: QuEST_validation.c:349
void validateMultiQubitUnitaryMatrix(Qureg qureg, ComplexMatrixN u, int numTargs, const char *caller)
Definition: QuEST_validation.c:502
#define qreal
void validateMultiQubitMatrix(Qureg qureg, ComplexMatrixN u, int numTargs, const char *caller)
Definition: QuEST_validation.c:496
void validateMultiQubitKrausMap(Qureg qureg, int numTargs, ComplexMatrixN *ops, int numOps, const char *caller)
Definition: QuEST_validation.c:634
void validateMeasurementProb(qreal prob, const char *caller)
Definition: QuEST_validation.c:527
void validateMultiRegBitEncoding(int *numQubitsPerReg, int numRegs, enum bitEncoding encoding, const char *caller)
Definition: QuEST_validation.c:976
void validateMultiQubits(Qureg qureg, int *qubits, int numQubits, const char *caller)
Definition: QuEST_validation.c:444
void validatePauliCodes(enum pauliOpType *pauliCodes, int numPauliCodes, const char *caller)
Definition: QuEST_validation.c:599
void validateUnitaryComplexPair(Complex alpha, Complex beta, const char *caller)
Definition: QuEST_validation.c:507
void validateControlState(int *controlState, int numControlQubits, const char *caller)
Definition: QuEST_validation.c:468
void validateMatrixInit(ComplexMatrixN matr, const char *caller)
Definition: QuEST_validation.c:486
void validateNumElems(DiagonalOp op, long long int startInd, long long int numElems, const char *caller)
Definition: QuEST_validation.c:393
void validateTarget(Qureg qureg, int targetQubit, const char *caller)
Definition: QuEST_validation.c:400
void validateOutcome(int outcome, const char *caller)
Definition: QuEST_validation.c:523
void validateMultiVarPhaseFuncOverrides(int *numQubitsPerReg, const int numRegs, enum bitEncoding encoding, long long int *overrideInds, int numOverrides, const char *caller)
Definition: QuEST_validation.c:886
Represents a diagonal complex operator on the full Hilbert state of a Qureg.
Definition: QuEST.h:297
A Pauli Hamiltonian, expressed as a real-weighted sum of pauli products, and which can hence represen...
Definition: QuEST.h:277
void validateTwoQubitKrausMap(Qureg qureg, ComplexMatrix4 *ops, int numOps, const char *caller)
Definition: QuEST_validation.c:622
void validateTwoQubitDepolProb(qreal prob, const char *caller)
Definition: QuEST_validation.c:583
void validateMultiTargets(Qureg qurge, int *targetQubits, int numTargetQubits, const char *caller)
Definition: QuEST_validation.c:428
void validatePauliHamil(PauliHamil hamil, const char *caller)
Definition: QuEST_validation.c:655
void validateTwoQubitUnitaryMatrix(Qureg qureg, ComplexMatrix4 u, const char *caller)
Definition: QuEST_validation.c:481
void validateNumAmps(Qureg qureg, long long int startInd, long long int numAmps, const char *caller)
Definition: QuEST_validation.c:387
void validateDensityMatrQureg(Qureg qureg, const char *caller)
Definition: QuEST_validation.c:519
void validateMatchingQuregTypes(Qureg qureg1, Qureg qureg2, const char *caller)
Definition: QuEST_validation.c:535
void validateHamilFilePauliParsed(int parsed, PauliHamil h, FILE *file, char *fn, const char *caller)
Definition: QuEST_validation.c:683
void validateOneQubitUnitaryMatrix(ComplexMatrix2 u, const char *caller)
Definition: QuEST_validation.c:477
void validateMultiControlsMultiTargets(Qureg qureg, int *controlQubits, int numControlQubits, int *targetQubits, int numTargetQubits, const char *caller)
Definition: QuEST_validation.c:459
void validateHamilFileParams(int numQubits, int numTerms, FILE *file, char *fn, const char *caller)
Definition: QuEST_validation.c:664
void validateFileOpened(int opened, char *fn, const char *caller)
Definition: QuEST_validation.c:543
void validateTrotterParams(int order, int reps, const char *caller)
Definition: QuEST_validation.c:703
void validateMultiControls(Qureg qureg, int *controlQubits, int numControlQubits, const char *caller)
Definition: QuEST_validation.c:436
void validateOneQubitDampingProb(qreal prob, const char *caller)
Definition: QuEST_validation.c:578
void validateDiagOpInit(DiagonalOp, const char *caller)
Definition: QuEST_validation.c:709
void validatePhaseFuncTerms(int numQubits, enum bitEncoding encoding, qreal *coeffs, qreal *exponents, int numTerms, long long int *overrideInds, int numOverrides, const char *caller)
Definition: QuEST_validation.c:773
void validateVector(Vector vector, const char *caller)
Definition: QuEST_validation.c:511
bitEncoding
Flags for specifying how the bits in sub-register computational basis states are mapped to indices in...
Definition: QuEST.h:269
void validateNormProbs(qreal prob1, qreal prob2, const char *caller)
Definition: QuEST_validation.c:555
void validateBitEncoding(int numQubits, enum bitEncoding encoding, const char *caller)
Definition: QuEST_validation.c:966