| 91 | } |
| 92 | |
| 93 | QProg Simon_QProg(vector<Qubit*> qVec, vector<ClassicalCondition> cVec, vector<int> funvalue) |
| 94 | { |
| 95 | size_t length = cVec.size(); |
| 96 | auto simon_qprog = CreateEmptyQProg(); |
| 97 | for (auto i = 0; i < length; i++) |
| 98 | { |
| 99 | simon_qprog << H(qVec[i]); |
| 100 | } |
| 101 | simon_qprog << oraclefunc(qVec,funvalue); |
| 102 | for (auto i = 0; i < length; i++) |
| 103 | { |
| 104 | simon_qprog << H(qVec[i]); |
| 105 | } |
| 106 | for (auto i = 0; i < length; i++) |
| 107 | { |
| 108 | simon_qprog << Measure(qVec[i],cVec[i]); |
| 109 | } |
| 110 | return simon_qprog; |
| 111 | } |
| 112 | |
| 113 | int main() |
| 114 | { |
no test coverage detected