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

pi_check in qasm and truncate floats #4276

Merged
merged 8 commits into from
Apr 27, 2020
Merged

pi_check in qasm and truncate floats #4276

merged 8 commits into from
Apr 27, 2020

Conversation

nonhermitian
Copy link
Contributor

Summary

fixes #4272
Does what the title says.

Screen Shot 2020-04-26 at 22 14 02

Details and comments

jaygambetta
jaygambetta previously approved these changes Apr 27, 2020
Copy link
Member

@jaygambetta jaygambetta left a comment

Choose a reason for hiding this comment

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

i'm good was thinking about the location in circuits but i think this is used enough that we should include. also see the need for sqrt(2) as well.

@ajavadia
Copy link
Member

can you add a test that the qasm produced by this is parsable.

@ajavadia
Copy link
Member

good to go after it passes

@nonhermitian
Copy link
Contributor Author

Hold on doing sqrt(2) as well

@jaygambetta
Copy link
Member

@nonhermitian that was just as a suggestion in my approval. It could be another pr as there might be a few irrational numbers we want to use (don't do them all but quantum does use a few)

@nonhermitian
Copy link
Contributor Author

Ok, I hold off for another day.

@mergify mergify bot merged commit 6dd5893 into master Apr 27, 2020
@nonhermitian nonhermitian deleted the qasm_print branch April 28, 2020 10:36
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* pi_check in qasm and truncate floats

* lint

* Update latex.py

* Update matplotlib.py

* Update text.py

* add round trip qasm test

Co-authored-by: Jay Gambetta <jay.gambetta@us.ibm.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.

Qasm output should look for numbers close to fractions of pi
3 participants