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

Handle shape mismatch for cirq.dirac_notation #6179

Merged
merged 7 commits into from Jul 7, 2023

Conversation

jeeva2812
Copy link
Contributor

@jeeva2812 jeeva2812 commented Jul 4, 2023

Throwing a value error when there is a shape mismatch between state_vector and qid_shape. It also throws an error when qid_shape is not mentioned and length of state_vector is not a power of 2.

Fixes #6165

@jeeva2812 jeeva2812 requested review from a team, vtomole and cduck as code owners July 4, 2023 16:08
@google-cla
Copy link

google-cla bot commented Jul 4, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@CirqBot CirqBot added the size: S 10< lines changed <50 label Jul 5, 2023
Copy link
Collaborator

@dstrain115 dstrain115 left a comment

Choose a reason for hiding this comment

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

One comment, otherwise, LGTM.

cirq-core/cirq/qis/states_test.py Outdated Show resolved Hide resolved
@vtomole vtomole added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Jul 7, 2023
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Jul 7, 2023
@CirqBot CirqBot merged commit a041ef8 into quantumlib:master Jul 7, 2023
30 checks passed
@CirqBot CirqBot removed automerge Tells CirqBot to sync and merge this PR. (If it's running.) front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. labels Jul 7, 2023
@jeeva2812 jeeva2812 deleted the dirac-notation branch July 8, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cirq.dirac_notation can't handle qudits when qid_shape is not passed in.
4 participants