Skip to content

Allow seed as a tensor-valued argument to sample #305

Description

@ihincks

Description

We should allow seed as a tensor-valued argument to sample with intrinsic shape (), that is, a scalar.
The reason for doing this is to allow downstream components (executor cough cough) to allow broadcasting semantics over the seed.

This will allow users to do things like this

quantum_program.append_samplex_item(
    template,
    samplex,
    samplex_arguments={seed: <1x20>, basis_changes.x: <9, 1>:})

in order to end up with 9 basis changes, but where the pauli randomizations are the same for each basis change.

Acceptance criteria

The seed is settable as a tensor-valued argument when invoking Samplex.sample().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions