Repository navigation
Conversation
|
There was a problem hiding this comment.
I think this PR is quite straightforward, but at some point we probably need to separate noise instructions from regular gates, because you don't actually need the noise for power estimation.
If we're actually running things in simulation mode, you would expect something to automatically insert the noise instructions as part of the noise modelling.
4e2ba2c to
f8ff924
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The instruction is consistently wired through parsing, execution, bytecode, unsupported-backend handling, and tests.
0 open findings
What changed in this PR
Adds leakage-channel instructions across the vihaco ISA, PPVM execution and bytecode layers, with TUI and end-to-end coverage.
Changes:
- Adds parsing, resolution, dispatch, and bytecode support for
Leakage. - Rejects leakage on unsupported PauliSum backends.
- Adds TUI syntax/help and source/bytecode execution tests.
| File | Description |
|---|---|
crates/vihaco-circuit-isa/src/lib.rs |
Defines and parses the leakage instruction. |
crates/ppvm-vihaco/src/syntax.rs |
Lowers leakage into its runtime instruction. |
crates/ppvm-vihaco/src/composite.rs |
Resolves leakage operands from the stack. |
crates/ppvm-vihaco/src/component.rs |
Dispatches leakage or reports unsupported backends. |
crates/ppvm-vihaco/src/bytecode.rs |
Encodes and decodes leakage bytecode. |
crates/ppvm-vihaco/tests/tableau_leakage.sst |
Exercises deterministic tableau leakage. |
crates/ppvm-vihaco/tests/paulisum_leakage_error.sst |
Covers unsupported PauliSum execution. |
crates/ppvm-vihaco/tests/sst_fixtures.rs |
Tests source and bytecode leakage paths. |
crates/ppvm-tui/src/command.rs |
Adds leakage command parsing. |
crates/ppvm-tui/src/app.rs |
Documents leakage in TUI help. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
After #195 gets merged, we need to rebase this branch with
cc @kaihsin this PR introduces a breaking change in the vihaco-circuit-isa since it adds the enum variants for leakage.