Skip to content

request: Add opt-in emission of the check-redundancy (meta-check) parities to css_code_memory_circuit #312

Description

@YaegakiY

Contributor License Agreement

  • A Contributor License Agreement signature is requested for any first PR contribution. Further information can be found in our contributing guidelines.

Motivation

css_code_memory_circuit on BivariateBicycleCode(param_l=6, param_m=6, m_A_powers=[3,1,2], m_B_powers=[3,1,2]) emits an annotation whose span misses exactly six of the circuit's deterministic measurement parities, for every tested num_rounds (1, 2, 3, 6), identically on deltakit 0.8.0 and 0.9.0. The six are the X-side check redundancies of the [[72,12,6]] code: the 36 X-checks have rank 30, so six dependencies hold among them, and the product of first-round X-ancilla outcomes over each dependency is deterministic even though the individual outcomes are random. Each parity is a product of 16 to 18 measurement records. An X-basis memory mirrors this with the six Z-side redundancies on the other ancilla set.

The count is forced by the circuit shape rather than fitted: the emitted annotation (first-round Z detectors, round-to-round comparisons, final-round data comparisons, observables) spans every deterministic measurement parity except the first-round dependency products of the random-basis side, whose number is the check-matrix rank deficit lm minus rank(Hx), equal to k/2 for bivariate-bicycle codes by the rank symmetry of the construction. The closed-form rank accounting (r·lm + (r-1)·lm + rank(Hz) + k + k/2) reproduces the measured invariant and annotation ranks exactly on all tested round counts. The family sweep below then tests the remaining empirical question, that the generator emits exactly these classes on every instance:

instance (l, m) k missing parities parity sizes
[[72,12,6]] (6, 6) 12 6 16 to 18
[[90,8,10]] (15, 3) 8 4 20
[[108,8,10]] (9, 6) 8 4 24
[[144,12,12]] (12, 6) 12 6 32 to 36
[[288,12,18]] (12, 12) 12 6 64 to 72

These parities are the meta-check information that single-shot decoding and syndrome-validation workflows for qLDPC codes consume: each is flippable by single measurement faults, and they are the only deterministic X-side syndrome content of the first round in a Z-basis memory. They are payload-independent (verified on [[72,12,6]] by logical-insertion differencing over all twelve logical directions), so they are valid DETECTOR content, and they lie outside the span of the emitted detectors and observables, so downstream users cannot recover them from the emitted artifact without re-deriving the code's check dependencies themselves.

Scope, to be precise about what this is not: circuit distance is unaffected at this size (6 before and after completion), and in measurements the standard memory pipeline (circuit-level BP+OSD over the full syndrome history) shows no logical-error-rate change from the absence of these parities. The request is about making already-measured information available to the decoders built to use it, not a correctness report about the current emission.

Proposed solution

Emit the check-side redundancy parities in a structured, opt-in form rather than into the default detector stream. Two shapes that would both work: a keyword argument on css_code_memory_circuit (for example include_check_redundancies=True) that appends them as clearly identified extra DETECTORs, or an accessor on the code or experiment object that returns the redundancy basis as measurement-record sets so consumers can attach them however their decoder expects.

One measured caveat motivates the opt-in shape: appending these parities as plain DETECTORs into the default stream degrades a stock circuit-level BP+OSD decode at small round counts (the rows have fan-in 16 to 18 and are dense in the Tanner graph), so changing the default emission would regress existing consumers. Measurement details available on request.

Potential alternatives

Documentation only: state that check-redundancy (meta-check) parities are not emitted and document how to derive them from the check matrix rank deficit. Cheapest option; every meta-check consumer re-derives the same basis.

Emit by default as ordinary DETECTORs: not proposed, per the caveat above (regresses standard BP+OSD decoding at small round counts and silently changes the DEM shape for every existing consumer).

Leave as is: current memory-experiment users lose nothing measurable, but single-shot and syndrome-validation workflows on BB codes cannot be built on the emitted artifacts, and the information is discarded although the measurements paying for it are already in the circuit.

Additional context

One valid basis for the six parities on the num_rounds=3 Z-basis memory (288 measurement records), reduced modulo the emitted annotation and directly appendable at the end of the circuit:

DETECTOR rec[-144] rec[-140] rec[-136] rec[-134] rec[-129] rec[-127] rec[-126] rec[-125] rec[-124] rec[-121] rec[-120] rec[-117] rec[-116] rec[-115] rec[-114] rec[-113] rec[-110] rec[-109]
DETECTOR rec[-143] rec[-139] rec[-135] rec[-133] rec[-132] rec[-128] rec[-126] rec[-125] rec[-124] rec[-123] rec[-120] rec[-119] rec[-116] rec[-115] rec[-114] rec[-113] rec[-112] rec[-109]
DETECTOR rec[-142] rec[-140] rec[-135] rec[-133] rec[-132] rec[-131] rec[-130] rec[-127] rec[-126] rec[-123] rec[-122] rec[-121] rec[-120] rec[-119] rec[-116] rec[-115] rec[-114] rec[-110]
DETECTOR rec[-141] rec[-139] rec[-136] rec[-135] rec[-134] rec[-133] rec[-131] rec[-127] rec[-126] rec[-125] rec[-122] rec[-121] rec[-119] rec[-117] rec[-114] rec[-113] rec[-112] rec[-111]
DETECTOR rec[-138] rec[-136] rec[-135] rec[-133] rec[-132] rec[-130] rec[-129] rec[-127] rec[-120] rec[-118] rec[-117] rec[-115] rec[-114] rec[-112] rec[-111] rec[-109]
DETECTOR rec[-137] rec[-136] rec[-134] rec[-133] rec[-131] rec[-130] rec[-128] rec[-127] rec[-119] rec[-118] rec[-116] rec[-115] rec[-113] rec[-112] rec[-110] rec[-109]

These representatives are reduced modulo the emitted annotation, which places them on the last round's X-ancilla block; equivalent representatives supported on the first round exist and differ by emitted comparison detectors. Record sets for the other round counts, the X-basis mirror, and reproduction scripts are available on request. Environment: deltakit 0.8.0 and 0.9.0 (identical noised detector error models for these configurations), stim 1.16.0, Python 3.12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions