Contextuality of Quantum Error-Correcting Codes
Derek Khu, Andrew Tanggara, Chao Jin, Kishor Bharti
Published: 2025/2/4
Abstract
Universal fault-tolerant quantum computation requires overcoming the Eastin--Knill theorem on quantum error correction (QEC) codes that protect information from noise. This is often accomplished through strategies like magic state distillation, which prepares computational resources -- namely, magic states -- whose power is rooted in quantum contextuality, a fundamental nonclassical feature generalizing Bell nonlocality. Yet, the broader role of contextuality in enabling universality, including its significance as an inherent feature of QEC codes and protocols themselves, has remained largely unexplored. In this work, we develop a rigorous framework for contextuality in QEC and prove three main results. Fundamentally, we show that subsystem stabilizer codes with two or more gauge qubits are strongly contextual in their partial closure, while others are noncontextual, establishing a clear criterion for identifying contextual codes. Mathematically, we unify Abramsky--Brandenburger's sheaf-theoretic and Kirby--Love's tree-based definitions of contextuality, resolving a conjecture of Kim and Abramsky. Practically, we prove that many widely studied code-switching protocols which admit universal transversal gate sets, such as the doubled color codes introduced by Bravyi and Cross, are necessarily strongly contextual in their partial closure. Collectively, our results establish quantum contextuality as an intrinsic characteristic of fault-tolerant quantum codes and protocols, complementing entanglement and magic as resources for scalable quantum computation. For quantum coding theorists, this provides a new invariant: contextuality classifies which subsystem stabilizer codes can participate in universal fault-tolerant protocols. These findings position contextuality not only as a foundational concept but also as a practical guide for the design and analysis of future QEC architectures.