Sparse quantum codes are analogous to LDPC codes in that their check operators require examining only a constant number of qubits. In contrast to LDPC codes, good sparse quantum codes are not known, and even to encode a single qubit, the best known distance is O( n log(n)), due to Freedman, Meyer and Luo.We construct a new family of sparse quantum subsystem codes with minimum distance n 1− for = O(1/ √ log n). A variant of these codes exists in D spatial dimensions and has d = n 1− −1/D , nearly saturating a bound due to Bravyi and Terhal.Our construction is based on a new general method for turning quantum circuits into sparse quantum subsystem codes. Using this prescription, we can map an arbitrary stabilizer code into a new subsystem code with the same distance and number of encoded qubits but where all the generators have constant weight, at the cost of adding some ancilla qubits. With an additional overhead of ancilla qubits, the new code can also be made spatially local.