Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Tensors from classical action #691

Closed
mpharrigan opened this issue Feb 20, 2024 · 0 comments · Fixed by #1514
Closed

Tensors from classical action #691

mpharrigan opened this issue Feb 20, 2024 · 0 comments · Fixed by #1514

Comments

@mpharrigan
Copy link
Collaborator

Provide functionality for automatically supporting the tensor simulation protocol if a bloq supports classical simulation.

tensor = np.zeros(...)
for inputs in itertools.product(reg.all_possible_inputs for reg in self.signature):
  ouputs = bloq.call_classically(inputs)
  tensor[outputs, inputs] = 1

We'll likely need some new methods on the quantum data types

  • getting all possible values
  • a canonical ordering of values in the domain so we can assign to zero-indexed indices in the tensors
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant