Skip to content

Add binary literal example to compute_amplitudes_sweep and compute_amplitudes methods of SimulatesAmplitudes class. #2603

Closed
@iamvamsikrishnad

Description

@iamvamsikrishnad

The signature of compute_amplitudes_sweep and compute_amplitudes requires bitstrings to be a list of int's. Because of the semantics in python3 of not allowing leading zeros for int's (https://stackoverflow.com/questions/36386346/syntaxerror-invalid-token) this can be confusing.

For eg: if I want to measure a bitstring 0010, I need to provide 10 as input to the bitstring which is confusing to the user.

I propose to change the type of bitstrings to Sequence[str].

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/docsarea/simulationcomplexity/lowintroduces/modifies 1-2 concepts, should take 1-2 days max for an advanced contributorskill-level/beginnerNo background required, self-contained issuetriage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions