Skip to content

blueqat 1.0.3 - 2022-05-14

Compare
Choose a tag to compare
@minatoyuichiro minatoyuichiro released this 14 May 09:19
· 42 commits to master since this release

QAOA with Tensornetwork

from blueqat.utils import qaoa

from blueqat import Circuit
from blueqat.pauli import qubo_bit as q
from blueqat.pauli import X,Y,Z,I

hamiltonian = (15-(1+2*q(0)+4*q(1))*(1+2*q(2)))**2
step = 1
init = Circuit().h[0].cx[0,1].x[0]
mixer = (X[0]*X[1]+Y[0]*Y[1])*0.5

result = qaoa(hamiltonian, step, init, mixer)

result.circuit.run(backend="quimb", shots=1000)