Implement circuit component and vm#66
Merged
Merged
Conversation
stellarscope to support generics
This commit depends on upstream fixes in vihaco-cpu and requires stellarscope#59 to be merged
… booleans to stack
893211d to
5a3765d
Compare
| const.u64 0 | ||
| circuit.measure | ||
|
|
||
| const.u64 0 |
Comment on lines
+4
to
+6
| // Jump into the helper, which finishes the program with `halt`. | ||
| // Using `halt` instead of `ret` from the callee avoids depending on | ||
| // vihaco-cpu restoring a return PC, which it doesn't track today. |
Comment on lines
+3
to
+5
| // TODO: aspirational — depends on `ret <n>` restoring the caller's PC and | ||
| // leaving the top `n` values on the caller's stack. The runtime doesn't do | ||
| // this today (Frame has no return_pc), so this fixture currently fails. |
Comment on lines
+81
to
+83
| // `function_call.sst` has main `call` into `@run_circuit`, which puts q1 | ||
| // in |+>, measures it, and `halt`s. Verifies CallPatch resolves the | ||
| // symbolic target and op_call actually transfers control there. |
| } | ||
| PPVMEffect::Measurement(effect) => { | ||
| let follow_ups = Observe::<MeasurementEffect>::observe(self, &effect)?; | ||
| // NOTE: push measurements to stack; two booleans: outcome, is_lost |
Collaborator
|
I'm gonna merge this first, we can come back to refactor if we are not happy with it, otherwise it's taking too long to review such a giant PR. |
Roger-luo
added a commit
that referenced
this pull request
Jul 8, 2026
Reverts #66. PR #66 was squash-merged into `main` (commit `60de9c8b`) but is causing repeated merge-conflict churn on `main`. This PR reverts that squash commit, restoring `main` to exactly its pre-#66 state (verified: reverted tree is identical to `2570637b`, the commit immediately before the merge). No work is lost: - The full 104-commit change set still lives on branch `david/42-circuit-component`. - That branch is re-opened as a fresh PR (see below) so the useful pieces can be re-introduced via targeted cherry-picks in separate, smaller PRs. Merge this first, then cherry-pick from the companion PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements a vihaco component for circuit execution with instructions and a simple VM, finally putting the VM into ppvm.
Closes #42.
Requires https://github.com/QuEraComputing/stellarscope/pull/51 to be merged.Requires https://github.com/QuEraComputing/stellarscope/pull/59 to be merged.Requires QuEraComputing/vihaco#3 to be merged.CI fails because of dependency issues (the repo can't pull in vihaco, since that's still private).