Skip to content

[emu-sv] sampling more than 25 atoms - multinomial restricts this #137

Description

@murogrande

running the following code:

from emu_sv import StateVector

qubit_count = 26
eigenstate = ('r','g')
amplitudes = {"r"*qubit_count:1.0}

state = StateVector.from_state_amplitudes(eigenstates=eigenstate,amplitudes=amplitudes)
print("sv  sampling",state.sample())

I got the following error:

 outcomes = torch.multinomial(probabilities, num_shots, replacement=True)
RuntimeError: number of categories cannot exceed 2^24
  • multinomial has an internal data type that restricts the number of categories to $2^{24}$.

We should have our own implementation since emu-sv simulate can more than 24 atoms

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions