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

feat!: Use angle type in quantum operations #467

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

mark-koch
Copy link
Collaborator

@mark-koch mark-koch commented Sep 9, 2024

Closes #240

BREAKING CHANGE: Quantum operations rx, rz, phased_x, and zz_max use the angle type instead of floats.

@mark-koch mark-koch requested a review from a team as a code owner September 9, 2024 12:54
@mark-koch mark-koch requested a review from acl-cqc September 9, 2024 12:54
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 58.33333% with 10 lines in your changes missing coverage. Please review.

Project coverage is 91.98%. Comparing base (9d35a78) to head (7669a6a).

Files with missing lines Patch % Lines
examples/t_factory.py 33.33% 6 Missing ⚠️
examples/random_walk_qpe.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #467      +/-   ##
==========================================
+ Coverage   91.94%   91.98%   +0.03%     
==========================================
  Files          58       58              
  Lines        5849     5852       +3     
==========================================
+ Hits         5378     5383       +5     
+ Misses        471      469       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -68,10 +70,10 @@ def random_walk_phase_estimation(
def example_controlled_oracle(q1: qubit, q2: qubit, t: float) -> tuple[qubit, qubit]:
Copy link
Member

Choose a reason for hiding this comment

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

should this function take an angle?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Depends how you interpret things. I always think of the t in e^(-itH) as time so I kept float here. But happy to change the angle if you prefer (will require more explicit angle to float and vice versa conversions though)

Copy link
Member

Choose a reason for hiding this comment

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

never mind

@mark-koch mark-koch added this pull request to the merge queue Sep 11, 2024
Merged via the queue into main with commit ce0f746 Sep 11, 2024
3 checks passed
@mark-koch mark-koch deleted the feat/quantum-angles branch September 11, 2024 09:19
github-merge-queue bot pushed a commit that referenced this pull request Sep 11, 2024
🤖 I have created a release *beep* *boop*
---


## [0.11.0](v0.10.0...v0.11.0)
(2024-09-11)


### ⚠ BREAKING CHANGES

* `guppy.take_module` renamed to `guppy.get_module` and no longer
removes the module from the state.
* Quantum operations `rx`, `rz`, `phased_x`, and `zz_max` use the
`angle` type instead of floats.

### Features

* Add implicit importing of modules
([#461](#461))
([1b73032](1b73032))
* Use angle type in quantum operations
([#467](#467))
([ce0f746](ce0f746))


### Bug Fixes

* hseries ops use floats instead of angles
([#483](#483))
([7ed3853](7ed3853)),
closes [#477](#477)
* Keep track of definitions that are implicitly imported
([#481](#481))
([a89f225](a89f225)),
closes [#480](#480)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

Use tket2 angle type for quantum gate parameters
3 participants