a qubit , then can be described in the form where ,,, and are complex constants, I is the identity, and the Pauli matrices are given by If U is equal to I, then no error occurs. If , a bit flip error occurs. If , a sign flip error occurs. If then both a bit flip error and a sign flip error occur. In other words, the Shor code can correct any combination of bit or phase errors on a single qubit. Bosonic codes Several proposals have been made for storing error-correctable quantum information in bosonic modes. Unlike a two-level system, a quantum harmonic oscillator has infinitely many energy levels in a single physical system. Codes for these systems include cat, Gottesman-Kitaev-Preskill (GKP), and binomial codes. One insight offered by these codes is to take advantage of the redundancy within a single system, rather than to duplicate many two-level qubits. Written in the Fock basis, the simplest binomial encoding is where the subscript L indicates a "logically encoded" state. Then if the dominant error mechanism of the system is the stochastic application of the bosonic lowering operator the corresponding error states are and respectively. Since the codewords involve only even photon number, and the error states involve only odd photon number, errors can be detected by measuring the photon number parity of the system. Measuring the odd parity will allow correction by application of an appropriate unitary operation without knowledge of the specific logical state of the qubit. However, the particular binomial code above is not robust to two-photon loss. General codes In general, a quantum code for a quantum channel is a subspace , where is the state Hilbert space, such that there exists another quantum channel with where is the orthogonal projection onto . Here is known as the correction operation. A non-degenerate code is one for which different elements of the set of correctable errors produce linearly independent results when applied to elements of the code. If distinct of the set of correctable errors produce orthogonal results, the code is considered pure. Models Over time, researchers have come up with several codes: Peter Shor's 9-qubit-code, a.k.a. the Shor code, encodes 1 logical qubit in 9 physical qubits and can correct for arbitrary errors in a single qubit. Andrew Steane found a code that does the same with 7 instead of 9 qubits, see Steane code. Raymond