Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Solution {
- open Microsoft.Quantum.Primitive;
- open Microsoft.Quantum.Canon;
- operation F2 (x : Qubit[], y : Qubit) : Unit {
- F1(x, y);
- }
- operation F1 (x : Qubit[], y : Qubit) : Unit {
- if (Length(x) > 1) {
- F2(x[0..Length(x)-2], y);
- }
- else {
- X(y);
- }
- }
- operation Solve (x : Qubit[], y : Qubit) : Unit
- {
- F1(x, y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement