MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / applyReferenceOp

Function applyReferenceOp

tests/deprecated/test_utilities.cpp:869–875  ·  view source on GitHub ↗

(do not generate doxygen doc) * * Overloads for applyReferenceOp, to conveniently specify all families of * unitary operations on state-vectors. */

Source from the content-addressed store, hash-verified

867 * unitary operations on state-vectors.
868 */
869void applyReferenceOp(
870 QVector &state, int* ctrls, int numCtrls, int *targs, int numTargs, QMatrix op
871) {
872 int numQubits = calcLog2(state.size());
873 QMatrix fullOp = getFullOperatorMatrix(ctrls, numCtrls, targs, numTargs, op, numQubits);
874 state = fullOp * state;
875}
876void applyReferenceOp(
877 QVector &state, int* ctrls, int numCtrls, int targ1, int targ2, QMatrix op
878) {

Callers 5

test_unitaries.cppFile · 0.85
applyReferenceMatrixFunction · 0.85
test_operators.cppFile · 0.85

Calls 3

calcLog2Function · 0.85
getFullOperatorMatrixFunction · 0.85
getConjugateTransposeFunction · 0.70

Tested by

no test coverage detected