push
github
Add base representation of `SparseObservable` (#12671) * Add base representation of `SparseObservable` This adds the base representation of `SparseObservable`, including the simple constructors from Python space and the ability to view the data buffers. This commit does not include the mathematical manipulations of the operators, nor some of the helper methods that will be used to manipulate the operators in the context of primitives execution. These will follow in subsequent patches. The design and implementation notes of `SparseObservable` are described in a Qiskit RFC that preceeded this patch series[^1], and it's best to consult that document for full details on the operator considerations. [^1]: https://github.com/Qiskit/RFCs/blob/7a74b0879/0021-sparse-observable.md * Rename `num_ops` to `num_terms` * Fix typos and :us: Co-authored-by: Julien Gacon <jul@zurich.ibm.com> * Add additional documentation * Fix tests of `num_terms` * Add more documentation * Fix error-message typo Co-authored-by: Julien Gacon <jul@zurich.ibm.com> --------- Co-authored-by: Julien Gacon <jul@zurich.ibm.com>
710 of 725 new or added lines in 4 files covered. (97.93%)
16 existing lines in 4 files now uncovered.74575 of 84134 relevant lines covered (88.64%)
367639.5 hits per line