Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improve initial_state handling for CliffordTableau and StabilizerStateChForm #3309

Merged
merged 4 commits into from
Sep 13, 2020

Conversation

smitsanghavi
Copy link
Collaborator

#2423

  • Use standard big_endian_int_to_digits method instead of local bits logic
  • Get bounds validation for the computational basis state for free
  • Improve comments in CliffordTableau, StabilizerStateChForm and CliffordSimulator
  • Remove np.ndarray as a valid type for StabilizerStateChForm initial_state since arbitrary state vectors are not really supported.
  • Add some tests

@googlebot googlebot added the cla: yes Makes googlebot stop complaining. label Sep 11, 2020
@balopat balopat self-assigned this Sep 12, 2020
Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, it's much more understandable this way. Thanks!
One tiny nit and then feel free to merge it.

cirq/sim/clifford/clifford_simulator.py Outdated Show resolved Hide resolved
smitsanghavi and others added 2 commits September 13, 2020 02:40
Co-authored-by: Balint Pato <balopat@users.noreply.github.com>
@smitsanghavi smitsanghavi merged commit c53ef33 into quantumlib:master Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants