Skip to content

Instantly share code, notes, and snippets.

@quantumjim
Created August 6, 2019 14:55
Show Gist options
  • Save quantumjim/b3152bd9299cad3b1870cc8a0287f498 to your computer and use it in GitHub Desktop.
Save quantumjim/b3152bd9299cad3b1870cc8a0287f498 to your computer and use it in GitHub Desktop.
def execute(c,shots=1024,output='counts'):
p2s=['I','X','Y','Z']*(c.n==2)+['']*(c.n==1)
def j(p1,p2,q):
return (p1+p2)*(q==1)+(p2+p1)*(q==0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment