Open afrah opened 1 year ago
It seems something might be going wrong in your operator construction. If the operator contains Pauli terms with complex coefficients, exponentiating it would not provide a unitary operation, which is why the code is raising an error. You can also double check this by computing the matrix representation of your operator, which should be hermitian but is not:
>>> h = H.to_matrix()
>>> np.allclose(np.conj(h.T), h)
False # should be True, such that the exponential will be unitary
Yes I symmetrizd the matrix using B = [[0 A],[A' 0]] with bb = [0 b ]and it works. Thank you.
Environment
What is happening?
The PauliTrotterEvolution class fails to exponentiate my Hamiltonain simulation. Attempting to do so gives the error message
How can we reproduce the issue?
I want to solve a PDE discretized matrix using HHL. The following code is a minimal working example.
What should happen?
This error should not happen. The error message is not informative enough.
Any suggestions?
The suggestion mentioned here does not help.
gives the same error,