Recursive countable #64
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi. I'm a independent researcher and i'm very interested in your work. Thank you for your contributions! However, I found some issues during my research and have made the following modifications:
Why I'm sending this
I wanted to model recursive quantum procedures (like RUS) and reason about them in SQIR, but the core language and logic don’t really cover recursion or countable assertions.(Consider that a while loop can lead to an infinite conjunction.) So I added a small RC layer to fill that gap.
What’s in this patch
CCall for recursive procedures
IConj for countable deterministic assertions
fixed‑point semantics for recursion
a WP calculus + soundness statement (with explicit assumptions)
New files
SQIR/RC_Syntax.v — extended commands + countable assertions
SQIR/RC_Semantics.v — denotational semantics with fixed points
SQIR/RC_Logic.v — WP + Hoare rules + soundness
examples/examples/RUSExample.v — RUS gate example
examples/examples/QFTExample.v — recursive QFT example
examples/examples/QuantumRandomWalkExample.v — QRW example with CWhile
Updated files
SQIR/UnitarySem.v, SQIR/UnitaryOps.v — import style tweak for -Q paths
Notes
This is additive and shouldn’t change existing SQIR behavior.
Soundness relies on a few clearly stated semantic assumptions in RC_Logic.v.
I hope this will be helpful to you.