Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for non-hermitian operators in AerPauliExpectation (#7857)
* Added support for non-hermitian operators in AerPauliExpectation Fixes #415 QEOM creates a dictionary of operators to evaluate on the groundstate. When using the noisy simulators (qasm_simulator or aer_simulator), one could either use PauliExpectation (with noise) or AerPauliExpectation (without noise). PauliExpectation works with non-hermitian operators but internal methods of AerPauliExpectation raised an Error. This is a workaround to this limitation. Note that using include_custom=True on qasm allows the VQE to use a local AerPauliExpectation without using the "expectation" input. This does not apply to QEOM and one should explicitly define the "expectation" input of the VQE for it to apply globally. * Added support for non-hermitian operators in AerPauliExpectation Fixes #415 QEOM creates a dictionary of operators to evaluate on the groundstate. When using the noisy simulators (qasm_simulator or aer_simulator), one could either use PauliExpectation (with noise) or AerPauliExpectation (without noise). PauliExpectation works with non-hermitian operators but internal methods of AerPauliExpectation raised an Error. This is a workaround to this limitation. Note that using include_custom=True on qasm allows the VQE to use a local AerPauliExpectation without using the "expectation" input. This does not apply to QEOM and one should explicitly define the "expectation" input of the VQE for it to apply globally. * Add a test case for non-hermitian operators. * Add a test case for non-hermitian operators. * Add a test case for non-hermitian operators. * Update test/python/opflow/test_aer_pauli_expectation.py Co-authored-by: Julien Gacon <gaconju@gmail.com> * Update aer_pauli_expectation.py Use a generator instead of list * Update qiskit/opflow/expectations/aer_pauli_expectation.py Co-authored-by: Julien Gacon <gaconju@gmail.com> * Update releasenotes/notes/add-support-non-hermitian-op-aerpauliexpectation-653d8e16de4eca07.yaml Co-authored-by: Julien Gacon <gaconju@gmail.com> * Add a test case for PauliOp * Change the test cases from using ~StateFn() to using StateFn(, is_measurement=True) * Fix the formatting Co-authored-by: Julien Gacon <gaconju@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information