|
Distributed QUEST for GPU
|
Internal functions used to implement the public facing API in qubits.h. More...
#include "QuEST_precision.h"Go to the source code of this file.
Functions | |
| void | phaseGate (MultiQubit multiQubit, const int targetQubit, enum phaseGateType type) |
| REAL | findProbabilityOfZero (MultiQubit multiQubit, const int measureQubit) |
| Measure the probability of a specified qubit being in the zero state. More... | |
| REAL | measureInZero (MultiQubit multiQubit, const int measureQubit) |
| Update the state vector to be consistent with measuring measureQubit=0. More... | |
| int | validateMatrixIsUnitary (ComplexMatrix2 u) |
| int | validateAlphaBeta (Complex alpha, Complex beta) |
| int | validateUnitVector (REAL ux, REAL uy, REAL uz) |
| void | exitWithError (int errorCode, const char *func) |
| void | QuESTAssert (int isValid, int errorCode, const char *func) |
| unsigned long int | hashString (char *str) |
Variables | |
| const char * | errorCodes [] |
Internal functions used to implement the public facing API in qubits.h.
Do not call these functions directly.
Definition in file QuEST_internal.h.
| void exitWithError | ( | int | errorCode, |
| const char * | func | ||
| ) |
| REAL findProbabilityOfZero | ( | MultiQubit | multiQubit, |
| const int | measureQubit | ||
| ) |
Measure the probability of a specified qubit being in the zero state.
| [in] | multiQubit | object representing the set of qubits |
| [in] | measureQubit | qubit to measure |
| unsigned long int hashString | ( | char * | str | ) |
Definition at line 238 of file QuEST.cpp.
Referenced by QuESTSeedRandomDefault().
| REAL measureInZero | ( | MultiQubit | multiQubit, |
| const int | measureQubit | ||
| ) |
Update the state vector to be consistent with measuring measureQubit=0.
Measure in Zero performs an irreversible change to the state vector: it updates the vector according to the event that a zero have been measured on the qubit indicated by measureQubit (where his label starts from 0, of course). It achieves this by setting all inconsistent amplitudes to 0 and then renormalising based on the total probability of measuring measureQubit=0. It then returns the probability of making this measurement.
| [in,out] | multiQubit | object representing the set of qubits |
| [in] | measureQubit | qubit to measure |
| void phaseGate | ( | MultiQubit | multiQubit, |
| const int | targetQubit, | ||
| enum phaseGateType | type | ||
| ) |
| void QuESTAssert | ( | int | isValid, |
| int | errorCode, | ||
| const char * | func | ||
| ) |
| int validateMatrixIsUnitary | ( | ComplexMatrix2 | u | ) |
Definition at line 168 of file QuEST.cpp.
References Complex::imag, ComplexMatrix2::r0c0, ComplexMatrix2::r0c1, ComplexMatrix2::r1c0, ComplexMatrix2::r1c1, Complex::real, and REAL_EPS.
1.8.14