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

Make string for powered gates consistent #3521

Merged
merged 7 commits into from Dec 11, 2020
Merged

Conversation

dabacon
Copy link
Collaborator

@dabacon dabacon commented Nov 22, 2020

Changes __str__ for HPowGate and PhasedXPowGate to be consistent with other methods that can be powered and uses ** and not ^ for the powering, i.e. H**0.5 not H^0.5.

@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Nov 22, 2020
@dabacon
Copy link
Collaborator Author

dabacon commented Nov 22, 2020

Not sure why the formatter went so crazy, yapf really seems to format multiline dicts pretty poorly.

@maffoo
Copy link
Contributor

maffoo commented Nov 22, 2020

Re: formatting, see #3516 :-)

@dabacon
Copy link
Collaborator Author

dabacon commented Nov 23, 2020

Re: formatting, see #3516 :-)

I saw that! Black seems to format the dicts nicely, whereas yapf makes the sound yapf when it formats them.

@balopat balopat added the automerge Tells CirqBot to sync and merge this PR. (If it's running.) label Nov 26, 2020
@CirqBot CirqBot added the front_of_queue_automerge CirqBot uses this label to indicate (and remember) what's being merged next. label Nov 26, 2020
@CirqBot CirqBot requested review from cduck, vtomole and a team as code owners November 26, 2020 03:56
@CirqBot
Copy link
Collaborator

CirqBot commented Nov 26, 2020

Automerge cancelled: A status check is failing.

@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 Nov 26, 2020
@balopat
Copy link
Contributor

balopat commented Nov 26, 2020

Uh-oh, out-of-time-order commits :)

E           AssertionError: Pattern 'H\\^0.5' does not match 'Gate H**0.5 acting on [0] cannot be serialized by IonQ API.'

@dabacon
Copy link
Collaborator Author

dabacon commented Dec 11, 2020

Stop hitting yourself @dabacon

@dabacon dabacon merged commit 7fabf03 into quantumlib:master Dec 11, 2020
@dabacon dabacon deleted the powstr branch April 16, 2022 15:42
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

5 participants