Skip to content

Instantly share code, notes, and snippets.

@quantumjim
Last active August 6, 2019 14:30
Show Gist options
  • Save quantumjim/ad5d777975dbaea882a20c1151201ec8 to your computer and use it in GitHub Desktop.
Save quantumjim/ad5d777975dbaea882a20c1151201ec8 to your computer and use it in GitHub Desktop.
class QuantumCircuit:
def __init__(c,n):
c.n=n
c.data = []
def x(c,q):
c.data.append(('r',pi,q))
def rx(c,T,q):
c.data.append(('r',T,q))
def h(c,q):
c.data.append(('h',q))
def cx(c,s,t):
c.data.append(('cx',t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment