Skip to content

Instantly share code, notes, and snippets.

@quantumjim
Created August 27, 2018 11:52
Show Gist options
  • Save quantumjim/9acefb3f0a4f5d7f350da1636da35156 to your computer and use it in GitHub Desktop.
Save quantumjim/9acefb3f0a4f5d7f350da1636da35156 to your computer and use it in GitHub Desktop.
qr = QuantumRegister(2)
qc = QuantumCircuit(qr,cr)
qc.h( qr[0] )
qc.cx( qr[0], qr[1] )
qc.ry( np.pi/4, qr[1])
qc.h( qr[1] )
qc.h(qr[0])
qc.h(qr[1])
qc.barrier(qr)
qc.measure(qr,cr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment