QuEST-Kit/QuEST

Hamiltonian Arithmetic

Closed this issue · 1 comments

I have been looking through the documentation to try find a way to do arithmetic with Hamiltonians, and have not found anything.
To be clear, I wish to create a Hamiltonian of a similar form to H = A + c*B**2 where A and B are both Pauli Sums. I was hoping there would be an automated way of adding and multiplying PauliSums, as oppose to computing the Pauli expansion of H by hand.
Is there a way to do this in QuEST?

Hi Joe,

QuEST doesn't have any facilities for symbolic simplification. However, if you have access to Mathematica, this possible in QuESTlink through the SimplifyPaulis function.
image

You can use its GetPauliSumFromCoeffs function to generate a symbolic Hamiltonian (like above) from the same Pauli Hamiltonian file accepted by QuEST's createPauliHamilFromFile.

Unfortunately this would be quite a sophisticated facility to add to QuEST, since even a natural syntax to specify the symbolic Hamiltonian expression would be difficult in C.

I hope this helps!