Skip to content

Add query/introspection methods to CircuitResult and CircuitBuilder #9

Description

@corgab

Context

CircuitResult is intentionally minimal: it exposes counts(), probabilities() and mostFrequent(). Common queries a caller needs are missing, e.g. probability(string $bitstring), count(string $bitstring), shots() (total measurements), and outcomes() (bitstrings sorted by frequency).

On the builder side, CircuitBuilder exposes qubitCount() and shotCount() but offers no way to inspect the circuit itself — there is no gateCount() or depth(). These are all pure read-only accessors on existing immutable value objects, fully consistent with the package's value-object style, and would also make assertions inside Quantum::fake() callbacks far more expressive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions