qiskit
qiskit copied to clipboard
Fast Rust path in `evolved_operator_ansatz` should support `SparseObservable`
What should we add?
The fast Rust path in evolved_operator_ansatz requires operators to be of type SparsePauliOp, however we should also be able to support SparseObservable type of operators. IIRC the Rust code already supports projectors, so ideally we only have to allow SparseObservable in
https://github.com/Qiskit/qiskit/blob/11801be6ba1fadb88c5045d6f7dbd0dd266f75ff/qiskit/circuit/library/n_local/evolved_operator_ansatz.py#L132
and write some tests.