Open paolostornati opened 1 year ago
Hi @paolostornati. There is actually fledgling, experimental support in the quimb.experimental.operatorbuilder.py
submodule. You can define arbitrary operators as sums of strings of single site operators, and it can among other things, build the MPO (though currently not guaranteed to be optimal bond dimension wise).
Do try it out, but be wary that its still experimental, and results should be checked thoroughly...
I started to wonder if this package could be used to simulate the dynamics of this paper in the case of 51 qubits. They claim to have used MPS, but I could not find any code. The idea would then be to find a way to perform calculations that are similiar to those, but on much larger systems...
I thought about a way to implement the third term of the Hamiltian like this:
builder = SpinHam1D(S=1 / 2)
phi = 1
num_modes = 3
for i in range(num_modes):
for j in range(i + 1, num_modes):
coeff = phi / np.abs(i - j) ** 6
builder[i,j] += coeff, 'Z', 'Z'
builder[i] += -coeff / 2, 'Z'
builder[j] += -coeff / 2, 'Z'
However, then I get the error that only nearest neighbors are implemented. Is this issue going in the same direction and could be possible to be implemented with the operators that were mentionned above ?
What is your issue?
I am trying to implement a Hamiltonian in the MPO formalism the include 3-4 body terms that are almost local. The maximal distance is 5 lattice points. As far as I understood, this is not possible in quimb. Am I correct? Thanks in advance for any help