Closed aemccoy closed 3 years ago
Thanks @aemccoy! Just to confirm -- for your current workflow, would you prefer that attempting to convert a Hamiltonian with complex coefficients raises an error? Or, alternatively, would you like a way to represent a (potentially) non-Hermitian linear combination of Pauli terms?
The ability to represent a potentially non-Hermitian linear combination of Pauli terms would be ideal. Thanks!
[bug]
Issue description
Expected behavior: Error when QubitOperator with complex coefficients are passed to
qchem.convert_observable
since vqe.Hamiltonian does not currently support complex coefficients.Actual behavior: No error arrises and complex part of QubitOperator is zeroed out.
Reproduces how often: Always
System information: (post the output of
import pennylane as qml; qml.about()
) Name: PennyLane Version: 0.16.0.dev0 Summary: PennyLane is a Python quantum machine learning library by Xanadu Inc. Home-page: https://github.com/XanaduAI/pennylane Author: None Author-email: None License: Apache License 2.0 Location: /opt/anaconda3/envs/pennylane/lib/python3.9/site-packages Requires: toml, semantic-version, networkx, autograd, appdirs, numpy, scipy Required-by: PennyLane-qiskit, PennyLane-Qchem Platform info: macOS-10.16-x86_64-i386-64bit Python version: 3.9.4 Numpy version: 1.20.1 Scipy version: 1.6.1 Installed devices:Source code and tracebacks
returns
while
returns