f(x),x is 2bits variable
| 80 | |
| 81 | //f(x),x is 2bits variable |
| 82 | QCircuit oraclefunc(vector<Qubit*> qVec, vector<int> funvalue) |
| 83 | { |
| 84 | auto length = qVec.size() / 2; |
| 85 | auto func = CreateEmptyCircuit(); |
| 86 | for (auto i = 0; i < 4; i++) |
| 87 | { |
| 88 | func << controlfunc(qVec, i, funvalue[i]); |
| 89 | } |
| 90 | return func; |
| 91 | } |
| 92 | |
| 93 | QProg Simon_QProg(vector<Qubit*> qVec, vector<ClassicalCondition> cVec, vector<int> funvalue) |
| 94 | { |
no test coverage detected