Skip to content

Commit

Permalink
Add base representation of SparseObservable
Browse files Browse the repository at this point in the history
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/7a74b08793475b7b0142d3a3f7142cabcfd33ab8/0021-sparse-observable.md
  • Loading branch information
jakelishman committed Oct 2, 2024
1 parent fee9f77 commit 50319a5
Show file tree
Hide file tree
Showing 10 changed files with 2,651 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/accelerate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ qiskit-circuit.workspace = true
thiserror.workspace = true
ndarray_einsum_beta = "0.7"
once_cell = "1.20.1"
bytemuck.workspace = true

[dependencies.smallvec]
workspace = true
Expand Down Expand Up @@ -60,4 +61,4 @@ version = "0.18.22"
features = ["macro"]

[features]
cache_pygates = ["qiskit-circuit/cache_pygates"]
cache_pygates = ["qiskit-circuit/cache_pygates"]
1 change: 1 addition & 0 deletions crates/accelerate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub mod remove_diagonal_gates_before_measure;
pub mod results;
pub mod sabre;
pub mod sampled_exp_val;
pub mod sparse_observable;
pub mod sparse_pauli_op;
pub mod split_2q_unitaries;
pub mod star_prerouting;
Expand Down
Loading

0 comments on commit 50319a5

Please sign in to comment.