Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Apply oracle and U gate twice
- circ = oracle(circ)
- circ = u_gate(circ)
- circ = oracle(circ)
- circ = u_gate(circ)
- circ.x(net[0])
- # Measure E, and rotate H to the P(1) value in the second row of the P(H|E) table condtioned on E
- circ.measure(net[1], cl[1])
- circ.u3(probToAngle(0.82) - probToAngle(0.39), 0, 0, net[2])
- # Sample by measuring the rest of the qubits
- circ.measure(net[0], cl[0])
- circ.measure(net[2], cl[2])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement