Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Remove BitStates.hpp in favor of vector<bool> #577

@swernli

Description

@swernli

BitStates.hpp is an odd element of the public headers for QIR, in that it is not needed for interacting with the runtime nor for building on top of it, and is instead a library used by our ToffoliSimulator and the QIR Runtime Unit Tests. This seems like an internal implementation detail that shouldn't be part of the public API. Moreover, it seems the original intent was to provide an efficient, tight packed vector of Boolean values where each Boolean only used one bit. It turns out that std::vector<bool> is already as specialization of vector for exactly this purpose, and is intentionally optimized for space in much the same way the BitStates helper class is (see the documentation for vector<bool> for more details).

We can remove this custom class and replace it's usage with vector<bool> and still meet the goal of space optimized bit tracking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions