SHARE
TWEET

Untitled

a guest Mar 1st, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. namespace Solution {
  2.     open Microsoft.Quantum.Primitive;
  3.     open Microsoft.Quantum.Canon;
  4.  
  5.     operation F2 (x : Qubit[], y : Qubit) : Unit {
  6.         F1(x, y);
  7.     }
  8.  
  9.     operation F1 (x : Qubit[], y : Qubit) : Unit {
  10.         if (Length(x) > 1) {
  11.             F2(x[0..Length(x)-2], y);
  12.         }
  13.         else {
  14.             X(y);
  15.         }
  16.     }
  17.  
  18.     operation Solve (x : Qubit[], y : Qubit) : Unit
  19.     {
  20.         F1(x, y);
  21.     }
  22. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top