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 ryy gate definition #1603

Merged
merged 5 commits into from
Sep 11, 2023
Merged

Conversation

bramathon
Copy link
Contributor

Description

  • Fixes the RYY gate definition RYY gate definition is wrong #1602 [auto-close]
  • Addes a new function in pyquil.paulis called exponentiate_pauli_sum. This function performs exponentiation of non-commuting PauliSums, but only for PauliSum with numeric values. The return is a unitary.
  • Tests that exponentiate_pauli_sum produces the quil gates.

Checklist

  • The PR targets the master branch
  • The above description motivates these changes.
  • The change is atomic and can be described by a single commit (your PR will be squashed on merge).
  • All changes to code are covered via unit tests.
  • Parameters and return values have type hints with [PEP 484 syntax][pep-484].
  • Functions and classes have useful [Sphinx-style][sphinx] docstrings.
  • (New Feature) The [docs][docs] have been updated accordingly.
  • (Bugfix) The associated issue is referenced above using [auto-close keywords][auto-close].

@bramathon bramathon requested a review from a team as a code owner June 29, 2023 10:18
@bramathon
Copy link
Contributor Author

I don't know how to fix this error:

pyquil/paulis.py:986: error: Call to untyped function "real" in typed context
pyquil/paulis.py:989: error: Returning Any from function declared to return "ndarray[Any, Any]"
pyquil/paulis.py:989: error: Call to untyped function "angle" in typed context

I guess it means that the numpy function np.angle isn't typed.

pyquil/paulis.py Outdated Show resolved Hide resolved
pyquil/paulis.py Show resolved Hide resolved
pyquil/paulis.py Outdated Show resolved Hide resolved
pyquil/paulis.py Outdated Show resolved Hide resolved
@MarquessV MarquessV merged commit 633f229 into rigetti:master Sep 11, 2023
10 checks passed
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