The latest blueqat 1.0.0 is now available. It includes the tensor network backend, which will be the main backend from now on.
pip install --no-deps -U git+https://github.com/jcmgray/quimb.git@develop autoray
After installing the necessary libraries with
from blueqat import Circuit
Circuit(50).h[:].run(backend="quimb")
to perform the calculation. To take multiple samples, use shots=n.
Circuit(4).h[:].run(backend="quimb", shots=100)
It is also possible to take the expectation value of the Hamiltonian. This function is very important in this case, instead of the state vector.
from blueqat.pauli import Z
hamiltonian = 1*Z[0]+1*Z[1]
Circuit(4).x[:].run(backend="quimb", hamiltonian=hamiltonian)
This time the simulator cannot take the entire state vector. Instead, it can take a single amplitude.
Circuit(4).h[:].run(backend="quimb", amplitude="0101")
The single amplitude corresponds to the amplitude of the binary value. The number of qubits used in the circuit must match the number of qubits in the answer. I'm not quite sure how to use this function, but it may be used in place of the state vector.
You can do larger size calculations on your PC, so please give it a try.
from blueqat import Circuit
c = Circuit(50).h[:]
for i in range(1, 50):
c.cx[0, i]
c.run(backend="quimb")
In the future, blueqat will focus on quantum machine learning applications. That is all.