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

Fix is zero and identity #710

Merged
merged 7 commits into from
Dec 1, 2018

Conversation

msohaibalam
Copy link
Contributor

The functions is_zero() and is_identity() weren't always checking correctly for their respective checks. Moreover, some of the unit tests were confusing identities for zero operators, e.g. the commutator of commuting operators is the zero, and the not the identity, operator. These issues have been fixed, and a few more unit tests have been added.

pyquil/paulis.py Outdated Show resolved Hide resolved
pyquil/paulis.py Outdated Show resolved Hide resolved
pyquil/paulis.py Outdated Show resolved Hide resolved
pyquil/paulis.py Outdated Show resolved Hide resolved
pyquil/paulis.py Outdated Show resolved Hide resolved
pyquil/paulis.py Outdated Show resolved Hide resolved
pyquil/paulis.py Outdated Show resolved Hide resolved
pyquil/paulis.py Outdated Show resolved Hide resolved
Copy link
Contributor

@mpharrigan mpharrigan left a comment

Choose a reason for hiding this comment

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

looks good. We're technically in a code freeze for a release on Friday, so we'll merge after that

@mpharrigan mpharrigan added this to the v2.2.0 milestone Nov 28, 2018
@mpharrigan mpharrigan merged commit 604bf26 into rigetti:master Dec 1, 2018
@msohaibalam msohaibalam deleted the fix-is-zero-and-identity branch December 13, 2018 00:18
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.

3 participants