Skip to content

X-basis measurements never become syndrome-history rounds #551

Description

@ciaranra

Surfaced by the adversarial review of #541. Pre-existing; #541 fixes the adjacent basis-read bug but does not close this.

Gap

extract_measurement_rounds (crates/pecos-qec/src/fault_tolerance/pauli_prop_checker.rs) hard-codes

let x_qubits = Vec::new(); // Currently not tracking X-basis measurements

and matches only MZ | MeasureFree | MPZ when collecting z_qubits. Two consequences:

  • MeasurementRound::x_qubits is always empty, so every consumer that iterates it -- including GadgetChecker::compute_syndrome_history and the canonical compute_syndrome_history -- has an unreachable branch.
  • A tick containing only MX produces no MeasurementRound at all, so X-basis readouts are invisible to syndrome history even as an empty row.

Relationship to #541

#541 makes the end-to-end analyze path basis-correct: with_x_ancillas now reads the component an X-basis readout actually flips on, and flips are recorded per readout in the correct basis. That path works for X-basis ancillas. The history path (analyze_with_syndrome_history) still cannot see them, because no X-basis round is ever extracted. So X-basis support is currently split: correct on one path, absent on the other.

What a fix needs

Collect MX (and any other X-basis readout) into x_qubits in extract_measurement_rounds, and confirm both compute_syndrome_history implementations order the combined row consistently with what their consumers expect (both currently emit z_qubits first, then x_qubits). Worth a regression that puts an X-basis round in a history and asserts the flip lands in the right column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrustPull requests that update rust codeseverity:mediumDegraded or awkward behavior with a workaround

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions