Skip to content

Conversation

@drqec
Copy link
Contributor

@drqec drqec commented Sep 27, 2024

Just taking a stab at fixing #638. Note, I don't fully understand how Tableau should work but I wrote the tests based on the examples, so I think this should be correct.

  • Adds normalization code by scaling each amplitude by the square root of the inverse of the state vector norm
  • Adds tests to match the examples from from_state_vector including an unnormalized version

Copy link
Collaborator

@Strilanc Strilanc left a comment

Choose a reason for hiding this comment

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

Yeah this is basically the functionality that's desired, but a few more tests and pushing it down into the C++ are needed.

@drqec drqec force-pushed the normalize-state-vectors branch 2 times, most recently from d4468ba to 75d9bde Compare October 8, 2024 22:27
@drqec drqec force-pushed the normalize-state-vectors branch from 75d9bde to c9607db Compare October 8, 2024 22:30
@drqec drqec requested a review from Strilanc October 11, 2024 21:24
@Strilanc Strilanc merged commit 34b4168 into quantumlib:main Oct 11, 2024
57 checks passed
@Strilanc
Copy link
Collaborator

Thanks for doing this!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants