Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
blueqat 1.0.3 - 2022-05-14.tar.gz | 2022-05-14 | 285.3 kB | |
blueqat 1.0.3 - 2022-05-14.zip | 2022-05-14 | 326.1 kB | |
README.md | 2022-05-14 | 458 Bytes | |
Totals: 3 Items | 611.8 kB | 0 |
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)