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

Function applyMultiStateControlledHadamard

quest/src/api/operations.cpp:621–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619}
620
621void applyMultiStateControlledHadamard(Qureg qureg, int* controls, int* states, int numControls, int target) {
622
623 qcomp a = 1/std::sqrt(2);
624 CompMatr1 matr = getCompMatr1({
625 {a, a},
626 {a,-a}});
627
628 validateAndApplyAnyCtrlAnyTargUnitaryMatrix(qureg, controls, states, numControls, &target, 1, matr, __func__);
629}
630
631} // end de-mangler
632

Callers 3

applyHadamardFunction · 0.85
applyControlledHadamardFunction · 0.85

Tested by

no test coverage detected