  We give a general construction relating Narain rational conformal field
theories (RCFTs) and associated 3d Chern-Simons (CS) theories to quantum
stabilizer codes. Starting from an abelian CS theory with a fusion group
consisting of $n$ even-order factors, we map a boundary RCFT to an $n$-qubit
quantum code. When the relevant 't Hooft anomalies vanish, we can orbifold our
RCFTs and describe this gauging at the level of the code. Along the way, we
give CFT interpretations of the code subspace and the Hilbert space of qubits
while mapping error operations to CFT defect fields.
