Skip to content

Make PauliString more efficient #47

@HaoTy

Description

@HaoTy

A bottleneck to the constant factor of detector annotation is the implementation of the PauliString class. It's currently a dictionary mapping qubits to strings. Some of the frequently used methods, such as anticommutes() and collapse_by() should really just be XORs, but are currently an iterative process involving many dictionary lookups. There are also frequent conversions from/to stim.PauliString, causing overheads.

In principle, the class can be replaced/reimplemented by stim.PauliString, a numpy array, or simply a Python int representing a bit array, where the information about the qubits is stored in BoundaryStabilizer or handled in some other way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions