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

Function getIndexOfTargetValues

tests/deprecated/test_utilities.cpp:829–838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

827}
828
829long long int getIndexOfTargetValues(long long int ref, int* targs, int numTargs, long long int targVal) {
830 // ref state is the starting index, where the targets can be in any bit state;
831 // on the bits of the non-target qubits matter
832
833 for (int t=0; t<numTargs; t++) {
834 int bit = (targVal >> t) & 1;
835 ref = setBit(ref, targs[t], bit);
836 }
837 return ref;
838}
839
840QVector getDFT(QVector in, int* targs, int numTargs) {
841

Callers 1

getDFTFunction · 0.85

Calls 1

setBitFunction · 0.70

Tested by

no test coverage detected