Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # Apply oracle and U gate twice
  2. circ = oracle(circ)
  3. circ = u_gate(circ)
  4. circ = oracle(circ)
  5. circ = u_gate(circ)
  6. circ.x(net[0])
  7.  
  8. # Measure E, and rotate H to the P(1) value in the second row of the P(H|E) table condtioned on E
  9. circ.measure(net[1], cl[1])
  10. circ.u3(probToAngle(0.82) - probToAngle(0.39), 0, 0, net[2])
  11.  
  12. # Sample by measuring the rest of the qubits
  13. circ.measure(net[0], cl[0])
  14. circ.measure(net[2], cl[2])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement