Skip to content

Implement SparseObservable.to_matrix #13389

@jakelishman

Description

@jakelishman

What should we add?

We already have SparsePauliOp.to_matrix in Rust space which is very optimised. We quite possibly want to move the SparsePauliOp.to_matrix logic into SparseObservable, generalise it slightly to handle the projectors, and then have SparsePauliOp.to_matrix work by lifting the SparsePauliOp to a SparseObservable and calling its to_matrix method; the slight initial overhead is peanuts compared to the time take to build a huge matrix (dense or sparse).

Metadata

Metadata

Assignees

No one assigned

    Labels

    mod: quantum infoRelated to the Quantum Info module (States & Operators)type: feature requestNew feature or request

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions