qodec-to-deq conversion : Pauli frame lost across ZZ parity measurement
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 47/100
Research direction
Start with _action_propagations in source/qdk_package/qdk/simulation/_qodec/deq_conversion.py and inspect how it maps incoming frame components across a nondestructive ZZ measurement. Run the attached repro.py with the pinned requirements; it should currently fail with the reported assertion. Done means the corrected readout XORs are all 1 while the qodec audit still passes.
Written by the indexing model from the issue text.
Description
Describe the bug
QDK's qodec-to-deq adapter loses an incoming Pauli-frame correction across a nondestructive ZZ measurement. This produces an incorrect final XX parity at zero noise, using only two unencoded qubits.
To Reproduce
-
Extract the attached
joint-frame-repro.zipand open a terminal in the
extracted directory. -
Create a fresh environment and install the pinned released packages from
PyPI. With Python 3.14 on Windows:py -3.14 -m venv .venv .\.venv\Scripts\python.exe -m pip install -r .\requirements.txt .\.venv\Scripts\python.exe -m pip check -
Run the attached script with that environment's interpreter:
.\.venv\Scripts\python.exe -B .\repro.py
The qodec passes ec.audit(..., promote_warnings=True). The experiment prints:
Final X-readout XORs: [0, 0, 0, 0, 0, 0, 0, 0]
It then raises AssertionError: Incoming Z frame was lost across the ZZ measurement.
This assertion, not an import/build/runtime error, is the expected reproduction.
Expected behavior
Every final XOR should be 1:
prepareprepares each qubit in the +1 eigenstate of X.frame(a)implements logical Z on A through a classical frame update only:
its physical circuit is empty, and its outgoing X-sign frame contribution is 1.
The interpreted state therefore has XX eigenvalue -1.jointphysically measures ZZ without discarding either qubit. Since
$[Z_A Z_B, X_A X_B]=0$, the XX eigenvalue must remain -1.readmeasures each qubit in X and incorporates its incoming frame.
Their corrected readout bits must have XOR 1.
Removing only the joint-measurement call restores the correct XOR of 1.
Removing only the frame update gives the expected XOR of 0.
System information
- OS: Windows 11
- Architecture: ARM64
- Python: x86-64 Python 3.14.7 (win-amd64, under emulation)
- QDK:
1.33.1, official PyPI Windows wheel. - qodec:
0.2.1; deq:0.5.16; deq-runtime:0.5.16; Stim:1.16.0. - paulimer:
0.2.9; binar:0.1.8.
Additional context
The suspect routine is
_action_propagations.
For this ZZ gadget it returns no incoming contribution for either outgoing X-sign
component. In the ordering (x_A, z_A, x_B, z_B), its map is
(0, 0, 0, z_A XOR z_B), whereas the incoming frame should survive the
nondestructive Pauli observation. Our input (1, 0, 0, 0) is consequently lost.
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 219
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 88
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/qdk
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Samples] Investigate redundant CheckMay be free again @theARCania claimed this 41 days ago, and no pull request is open. Openenhancement good first issue low-priority
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoft/qdk#1933 · 4 comments ·
Maintainers usually reply within 1 day
-
bug needs triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
RCA: `set () = { … }` drops its value's dynamic kind; code is lostPossibly taken @domorale claimed this 1 day ago. Openbug needs triage
Difficulty 4/5 3-5 days Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
FIR `tuple_decompose`: `{ set p = new P { … } }` (an assignment without a semicolon) panics with `LocalVarId consistency: … not bound`Possibly taken @domorale claimed this 1 day ago. Openbug needs triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
area:sim good first issue kind:feature
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
The demo's interval button and chart legend keep the previous interval after an interval changeOpenbug ui
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
userFRM/egui-charts#670 ·
Maintainers usually reply within 1 day
-
docs good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Usenova-Labs/usenova-backend#35 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
lugassawan/swe-workbench#823 ·
Maintainers usually reply within 1 day