Uh oh!
There was an error while loading. Please reload this page.
chore(deps): updated vihaco dependency to 0.4.0 - #214
Conversation
There was a problem hiding this comment.
👋 Thanks for opening your first pull request against PPVM!
A quick note on contribution terms: by submitting this PR you
agree that your contribution is licensed under the
Apache License 2.0
and that you accept the
PPVM Contributor License Agreement.
Please skim those before a maintainer reviews — opening this PR
counts as your acceptance.
A few things that will speed up review:
- Read
CONTRIBUTING.md
for the workflow, build commands, and style notes. - Run
prek run --all-fileslocally; CI runs the same checks. - Use Conventional Commits
for commit messages.
We'll get to your PR as soon as we can. Thanks for contributing!
david-pl
left a comment
There was a problem hiding this comment.
@robpatterson13 overall looks good, just some cosmetic comments. Agent review found two issues (which probably weren't introduced here, but still):
- Symbolic function references such as
@helperfail because FunctionRef operands are parsed only as numeric IDs. - main_function is stored as a code address instead of a function ID, and execution always starts at PC 0 rather than at
@main.
Here are some failing tests (run as part of tests in ppvm-vihaco/src/lib.rs):
#[test]fnsymbolic_function_ref_calls_named_function(){let src = "device circuit.n_qubits 1;\n\ fn @main() {\n\ cpu::cpu.const fn_ref, @helper\n\ cpu::cpu.call_indirect\n\ cpu::cpu.ret 0\n\ }\n\ fn @helper() {\n\ cpu::cpu.const u64, 0\n\ circuit::circuit.measure\n\ cpu::cpu.ret 0\n\ }\n";let machine = run_program(src).expect("symbolic function reference should resolve");assert_eq!(machine.measurement_record().len(),1);}#[test]fnexecution_starts_at_main_when_helper_is_declared_first(){let src = "device circuit.n_qubits 1;\n\ fn @helper() {\n\ cpu::cpu.const u64, 0\n\ circuit::circuit.x\n\ cpu::cpu.ret 0\n\ }\n\ fn @main() {\n\ cpu::cpu.const u64, 0\n\ circuit::circuit.measure\n\ cpu::cpu.ret 0\n\ }\n";let module = compile_program(src).expect("program should compile");letmut machine = PPVM::default();
machine.load(&module).expect("module should load");
machine.run().expect("program should run");assert_eq!((module.main_function, machine.measurement_record().len()),(Some(1),1),"main_function should be a function-table ID and execution should begin at @main");}Also, CI is blocked because the pre-commit hooks fail in an unrelated crate (not sure why). Would you mind fixing that so CI actually runs on the PR?
I'll approve the changes, feel free to merge once the above things are cleared up.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
… ty check errors causing CI to fail
…sues causing CI to fail
Uh oh!
There was an error while loading. Please reload this page.
|
Summary
Migrates ppvm-vihaco and vihaco-circuit-isa from vihaco 0.1.1 to vihaco 0.4.0.
Changes
vihaco::component!.docs/changelog/vihaco-0.4.md.Verification