import math
from simulator import *
### Bell State
'''
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
result = qc.execute(1024)
'''
### GHZ State
'''
qc = QuantumCircuit(3)
qc.h(0)
qc.cx(0, 1)
qc.cx(1, 2)
result = qc.execute(1024)
'''
### Quantum Teleportation
'''
qc = QuantumCircuit(3)
qc.h(0)
qc.h(1)
qc.cx(1, 2)
qc.cx(0, 1)
qc.h(0)
qc.cx(1, 2)
qc.cz(0, 2)
result = qc.execute(1024)
'''
### QFT (Quantum Fourier Transform)
'''
qc = QuantumCircuit(3)
qc.h(2)
qc.cz(1, 2)
qc.cz(0, 2)
qc.h(1)
qc.cz(0, 1)
qc.h(0)
result = qc.execute(1024)
'''
### VQE
'''
qc = QuantumCircuit(4)
qc.rx(0, math.pi / 3) # Parameter for qubit 0
qc.rx(1, math.pi / 4) # Parameter for qubit 1
qc.rx(2, math.pi / 6) # Parameter for qubit 2
qc.rx(3, math.pi / 5) # Parameter for qubit 3
qc.cx(0, 1)
qc.cx(1, 2)
qc.cx(2, 3)
qc.ry(0, math.pi / 2)
qc.ry(1, math.pi / 3)
qc.ry(2, math.pi / 4)
qc.ry(3, math.pi / 6)
qc.rx(0, math.pi / 7)
qc.rx(1, math.pi / 8)
qc.rx(2, math.pi / 9)
qc.rx(3, math.pi / 10)
result = qc.execute(1024)
'''
### Deutsch-Josza
'''
qc = QuantumCircuit(3)
qc.x(2)
qc.h(0)
qc.h(1)
qc.h(2)
qc.cx(0, 2)
qc.cx(1, 2)
qc.h(0)
qc.h(1)
result = qc.execute(1024)
'''
### Grover's Search
'''
qc = QuantumCircuit(3)
qc.h(0)
qc.h(1)
qc.h(2)
qc.cz(0, 1)
qc.x(0)
qc.x(1)
qc.h(0)
qc.h(1)
qc.h(2)
qc.x(0)
qc.x(1)
qc.cz(0, 1)
qc.x(0)
qc.x(1)
qc.h(0)
qc.h(1)
qc.h(2)
result = qc.execute(1024)
'''
### Random Gates
'''
qc = QuantumCircuit(4)
qc.h(2)
qc.x(2)
qc.t(3)
qc.y(1)
qc.ccx(1,2,3)
result = qc.execute(1024)
'''