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

Add support for return statements in conditionals #583

Merged
merged 8 commits into from Mar 6, 2024
Merged

Conversation

dime10
Copy link
Collaborator

@dime10 dime10 commented Mar 5, 2024

[sc-57417]

Introduces a new exception for mismatching array shapes across
conditional branches.

Refactors some of the tracing components for Cond.
@dime10 dime10 requested a review from josh146 March 5, 2024 14:29
Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

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

Nice, thanks @dime10!

doc/changelog.md Outdated Show resolved Hide resolved
doc/changelog.md Outdated Show resolved Hide resolved
doc/changelog.md Show resolved Hide resolved
doc/changelog.md Show resolved Hide resolved
doc/dev/autograph.rst Show resolved Hide resolved
doc/dev/autograph.rst Outdated Show resolved Hide resolved
doc/dev/autograph.rst Outdated Show resolved Hide resolved
doc/changelog.md Outdated Show resolved Hide resolved
doc/changelog.md Outdated Show resolved Hide resolved
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.48%. Comparing base (8120ee0) to head (cc8ff54).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #583   +/-   ##
=======================================
  Coverage   99.48%   99.48%           
=======================================
  Files          50       50           
  Lines        8678     8683    +5     
  Branches      612      616    +4     
=======================================
+ Hits         8633     8638    +5     
  Misses         25       25           
  Partials       20       20           

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

The output signature of a condational can no longer contain a quantum
register abstract value, because all control flow operators are now
instatiated first before conversion to JAXPR begins. Once a control flow
operator is converted to JAXPR, that's when the qreg values are added.
@dime10 dime10 merged commit ecc27fb into main Mar 6, 2024
34 checks passed
@dime10 dime10 deleted the return-statements branch March 6, 2024 17:39
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.

None yet

2 participants