Conversation
ciaranra
force-pushed
the
python-trace-replay-rxyxy2q
branch
from
September 20, 2026 05:58
4a384f4 to
b2c64b3
Compare
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.
Closes #803.
Problem
After #788 the Selene runtime lowers
RPPontoQuantumOp::RXYXY2Q, so QIS traces can now contain that operation._qis_trace_replay.pydid not know it: both the raw-operation path and the runtime-lowered path raised an unsupported-operation error, and PythonTickCircuithad no constructor for the gate.Change
TickCircuit.tick().rxyxy2q(theta, phi, pairs),Gate.rxyxy2q(theta, phi, pairs)andGateType.RXYXY2Qinpecos_rslib, mirroring theRZZequivalents, with.pyideclarations.RXYXY2Q; the serialized payload is{"Quantum":{"RXYXY2Q":[theta, phi, qubit_1, qubit_2]}}from the derived Serde form of the FFI enum.RXYXY2Qadded to the three Pythongate_groupstwo-qubit sets.The
with_noisegate lists are deliberately not touched here; #802 replaces them.Tests
A trace with
RXYXY2Q(-0.73, 0.41)on a non-trivial pair replays through both paths into aTickCircuitcarrying both angles in order on that pair (swapped angles or qubits fail); constructor tests for typed and float angles; incomplete-pair and unknown-operation cases still fail loudly.Verification
just python-ci-build-test,cargo clippy --locked -p pecos-rslib --all-targets -- -D warnings,cargo fmt --check,pytest tests/pecos/test_tracing.py(32 passed), the wider-k "replay or tracing or tick_circuit"selection (92 passed), andjust python-ci-lint, all clean.How this was produced
Implemented by OpenAI
gpt-6-astra(Codex CLI 0.154.0) from a task packet written by Claude Fable 5.1 in Claude Code; Claude reviewed every hunk, re-ran all verification itself, and sent findings back for fix rounds. An independent Codex review arm with no access to the implementation session also reviewed the diff. Posted at the maintainer's request.