Quantum code distances skip repeated search: BB-Net predicts them with an attention network at 96.39% test accuracy
Synopsis
The distance of a quantum low-density parity-check code sets its error-correction capability, yet exact computation is NP-hard and heuristic search is slow, which limits screening of large code spaces. BB-Net turns distance estimation for bivariate bicycle (BB) codes into a learning task: an attention network trained on roughly 58,000 codes labeled with upper bounds from high-budget heuristic searches predicts distance directly from the sparse polynomial structure. On the test set, BB-Net reaches 96.39% accuracy against reference distances, above the 94.86% of the best heuristic in the same table, QDistEvol, and evaluates one code in 0.005 s.
Interpretation
The distance of a quantum error-correcting code can now be predicted by a trained network instead of repeatedly running a search algorithm on every candidate. Distance is the minimum number of physical errors needed to cause an undetectable logical failure, the core measure of correction capability. Distance was previously evaluated with exact solvers or heuristics such as QDistRnd, QDistEvol and BP-OSD; exact methods scale exponentially with code size, and heuristics, though faster, remain far from real time, so code-search pipelines could only pre-filter with a limited budget. On the test set, BB-Net reaches 96.39% accuracy against reference distances with RMSE 1.131; the strongest heuristic in the same table, QDistEvol, reaches 94.86% with RMSE 1.485 while running 200 trials per code.
The network does not expand the full parity-check matrices; it extracts two complementary input representations from the code's sparse polynomial description and classifies the distance from them. The method, BB-Net, is an attention sequence architecture with a polynomial encoding branch and a Tanner spectral encoding branch, combined through a gate and passed to a distance-classification head. The polynomial branch builds one token per monomial with cyclic coordinate embeddings; the Tanner spectral branch builds one token per character of the finite Abelian group, using the polynomial responses at that character as features. Training uses 58,704 codes split 80:10:10 into training, validation and test sets.
On the test subset certified by an exact solver the gap to heuristics narrows, and on the hard-to-certify high-upper-bound subset the network leads. Of 5,870 test codes, the MILP exact solver certified the distance of 2,366 within a two-hour limit per code; none of the certified codes had a target distance above 14. On the certified subset BB-Net reaches 98.94% accuracy, versus 100% for QDistEvol and QDistRnd; the prose gives 100% for BP-OSD while Table 2 in the same source gives 99.96%, so that figure is not used here. On the uncertified upper-bound subset BB-Net reaches 94.66% accuracy and RMSE 1.380, versus 91.38% and 1.923 for the strongest heuristic baseline, QDistEvol.
Perspective
The demonstrated scope is bivariate bicycle codes and their non-CSS perturbed extensions, with a dataset of 58,704 codes. The evaluated setting is distance prediction and distance-screening ranking on the test set, and the network output corresponds to the heuristic distance upper bound rather than a certified exact distance.
Training labels come from taking the minimum over 10,000 trials each of BP-OSD, QDistRnd and QDistEvol, so they are upper bounds on the true distance; on the 2,366 test codes certified by MILP, the label matches the certified distance. Certified codes all have target distance at most 14, so higher-distance codes lack exact certificates. Distance-screening ROC-AUC is slightly below QDistEvol and QDistRnd at intermediate thresholds and comparable at the highest ones.
