NumPyEigensolver
does not support all BaseOperator
instances.
#9091
Labels
NumPyEigensolver
does not support all BaseOperator
instances.
#9091
Environment
What is happening?
NumPyEigensolver
and by extensionNumPyMinimumEigensolver
do not support allBaseOperator
instances, in particularSparsePauliOp
. This is because it requires thedata
attribute, whichOperator
exposes but e.g.SparsePauliOp
does not.How can we reproduce the issue?
Output:
What should happen?
The code should compute the eigenvalues without error, similarly to:
or:
Any suggestions?
Generalize the computation inside
NumPyEigensolver
to avoid thedata
attribute, perhaps viato_matrix()
or, if possible, a sparse implementation that works forBaseOperator
instances.The text was updated successfully, but these errors were encountered: