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

Cast initial state into complex dtype for default.qubit + Update Sum.label + fix qml.compile #6198

Merged
merged 12 commits into from
Sep 3, 2024

Conversation

mudit2812
Copy link
Contributor

@mudit2812 mudit2812 commented Aug 31, 2024

  • Upgrading qml to numpy 1.25 caused a bunch of ComplexWarnings to show up because we start out with a float initial state, which most likely gets cast into complex during execution. Then, during backprop, the complex state would get cast into float, which would raise the aforementioned warnings.

  • Sum.label was also overly detailed, causing qml.draw to look terrible. I changed the label to be consistent with LinearCombination and Hamiltonian.

  • qml.compile was not decomposing state prep ops, which is now changed.

Copy link
Contributor

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

@mudit2812 mudit2812 changed the title Cast initial state into complex dtype for default.qubit Cast initial state into complex dtype for default.qubit + Update Sum.label Aug 31, 2024
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (v0.38.0-rc0@f521ada). Learn more about missing BASE report.

Additional details and impacted files
@@              Coverage Diff               @@
##             v0.38.0-rc0    #6198   +/-   ##
==============================================
  Coverage               ?   99.66%           
==============================================
  Files                  ?      445           
  Lines                  ?    42394           
  Branches               ?        0           
==============================================
  Hits                   ?    42252           
  Misses                 ?      142           
  Partials               ?        0           

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

@mudit2812 mudit2812 added this to the v0.38 milestone Aug 31, 2024
@mudit2812 mudit2812 changed the title Cast initial state into complex dtype for default.qubit + Update Sum.label Cast initial state into complex dtype for default.qubit + Update Sum.label + fix qml.compile Sep 3, 2024
@mudit2812 mudit2812 enabled auto-merge (squash) September 3, 2024 14:04
@mudit2812 mudit2812 enabled auto-merge (squash) September 3, 2024 14:44
@mudit2812 mudit2812 merged commit 3d39e18 into v0.38.0-rc0 Sep 3, 2024
39 checks passed
@mudit2812 mudit2812 deleted the state-vector-cast branch September 3, 2024 16:47
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.

4 participants