Download Latest Version blueqat 2.0.4 - 2023-04-02.zip (311.1 kB)
Email in envelope

Get an email when there's a new version of qaqarot

Home / 1.0.3
Name Modified Size InfoDownloads / 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)
Source: README.md, updated 2022-05-14