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

'rotations' parameter is redundant if Qrack converts to observable basis #20

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

WrathfulSpatula
Copy link
Collaborator

@WrathfulSpatula WrathfulSpatula commented Jul 19, 2024

expval() has a parameter for the observable type to calculate, but this turns out to be redundant with rotations parameter passed into apply_operations(): I realize now, one either uses rotations parameter or transforms basis for expval() parameters, not both.

Copy link

@cosenal cosenal left a comment

Choose a reason for hiding this comment

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

LGTM
(details discussed on Discord)

@WrathfulSpatula
Copy link
Collaborator Author

For everyone else's sake: @cosenal noted that the wrapper method, without parsing rotations, was redundant if rotations wasn't used. I removed the level of indirection, but I kept the (public API method) signature, as it seems to be what PennyLane expects (since it does pass in rotations as a kwarg).

@WrathfulSpatula WrathfulSpatula merged commit 183aa4b into master Jul 19, 2024
1 check passed
@WrathfulSpatula WrathfulSpatula deleted the bugfix_observable_bases branch July 19, 2024 21:14
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