FifteenToOne's qubit and cycle count formulas are an exact match to their cited source (arXiv:1905.06903, page 11), and its internal noisy-circuit error simulation is a faithful reimplementation of the paper's protocol. I confirmed this directly: running FifteenToOne(9,3,3) at physical_error=1e-4 with the paper's own logical-error constant (a=0.1, from the paper's Eq. 7) reproduces the paper's own published result almost exactly, p_out = 9.300e-10 against the paper's stated 9.3e-10 for the same (15-to-1)_{9,3,3} configuration.
However, PhysicalCostModel.make_beverland_et_al() builds the LogicalErrorModel from QECScheme.make_beverland_et_al(), which uses a=0.03 (from Beverland et al., arXiv:2211.07629, Table V), and hands that into FifteenToOne instead of Litinski's own a=0.1. Running the same factory with this substituted constant gives p_out = 1.894e-10, about 4.9x smaller than Litinski's own paper predicts for identical (d_X, d_Z, d_m) and physical error rate.
Repro:
from qualtran.surface_code import FifteenToOne, LogicalErrorModel
factory = FifteenToOne(9, 3, 3)
# Litinski's own constant, reproduces the paper's Table 1 (p_out=9.3e-10)
litinski_model = LogicalErrorModel(error_rate_scaler=0.1, error_rate_threshold=0.01)
# what make_beverland_et_al() actually uses
beverland_model = LogicalErrorModel(error_rate_scaler=0.03, error_rate_threshold=0.01)
# compare factory.p_fail / factory error output under each, physical_error=1e-4
This is not a bug in the sense that FifteenToOne does something other than what it says. It correctly implements the paper's circuit and takes a QEC-scheme parameter as designed. The issue is that make_beverland_et_al() silently mixes Beverland's threshold assumption into Litinski's circuit rather than using Litinski's own constant, with nothing in the code or docstring flagging this as an intentional choice.
This may be deliberate, in which case a comment in the source noting that make_beverland_et_al() is a hybrid of Beverland (physical and logical error model) and Litinski (factory and data block layout) rather than a straight implementation of either would help, since the name currently reads as "this reproduces Beverland et al.'s procedure," which is not quite what is happening (see also #1943 for a related discrepancy in the data block formula from one of the same Litinski papers).
Source location: qualtran/surface_code/physical_cost_model.py, PhysicalCostModel.make_beverland_et_al(), lines 160-188 (constructs the mismatched LogicalErrorModel); the affected formula itself is correctly implemented in qualtran/surface_code/fifteen_to_one_factory.py, lines 52-54 and 94.
FifteenToOne's qubit and cycle count formulas are an exact match to their cited source (arXiv:1905.06903, page 11), and its internal noisy-circuit error simulation is a faithful reimplementation of the paper's protocol. I confirmed this directly: running
FifteenToOne(9,3,3)atphysical_error=1e-4with the paper's own logical-error constant (a=0.1, from the paper's Eq. 7) reproduces the paper's own published result almost exactly,p_out = 9.300e-10against the paper's stated9.3e-10for the same (15-to-1)_{9,3,3} configuration.However,
PhysicalCostModel.make_beverland_et_al()builds theLogicalErrorModelfromQECScheme.make_beverland_et_al(), which uses a=0.03 (from Beverland et al., arXiv:2211.07629, Table V), and hands that intoFifteenToOneinstead of Litinski's own a=0.1. Running the same factory with this substituted constant givesp_out = 1.894e-10, about 4.9x smaller than Litinski's own paper predicts for identical(d_X, d_Z, d_m)and physical error rate.Repro:
This is not a bug in the sense that
FifteenToOnedoes something other than what it says. It correctly implements the paper's circuit and takes a QEC-scheme parameter as designed. The issue is thatmake_beverland_et_al()silently mixes Beverland's threshold assumption into Litinski's circuit rather than using Litinski's own constant, with nothing in the code or docstring flagging this as an intentional choice.This may be deliberate, in which case a comment in the source noting that
make_beverland_et_al()is a hybrid of Beverland (physical and logical error model) and Litinski (factory and data block layout) rather than a straight implementation of either would help, since the name currently reads as "this reproduces Beverland et al.'s procedure," which is not quite what is happening (see also #1943 for a related discrepancy in the data block formula from one of the same Litinski papers).Source location:
qualtran/surface_code/physical_cost_model.py,PhysicalCostModel.make_beverland_et_al(), lines 160-188 (constructs the mismatchedLogicalErrorModel); the affected formula itself is correctly implemented inqualtran/surface_code/fifteen_to_one_factory.py, lines 52-54 and 94.