# Toric code vs Shor's code

I study computer science and wanted to get into the field of quantum computing. Right now, I'm trying to tackle the subject of quantum error correcting codes. As is the usual, I've started with Shor's code: Given a qubit, we transform it to a product of 9 qubits:

We measure the syndromes of every qubit to find out if an error occurred, and if it did we use the corresponding operator to fix it.

Now, I'm reading up on the Toric code as proposed by Kitaev. I don't completely understand how it works: I know it can protect two qubits, so lets assume we've got: $|a>, |b>$

I don't understand how will their lattice look like - how can we "write down" the lattice using standard notation (like how we wrote Shor's 9 qubit representation)?

• Writing down the state in "standard notation" is the wrong way of thinking about more complicated quantum error correcting codes. You get a horrendous mess which is very difficult to reason about, which is why you can't find the toric code written down that way. You should think about them in stabilizer notation. Gottesman has a very good survey article you might want to read. – Peter Shor Jun 11 '16 at 16:25
• In the 9-qubit code, we can express each of the logical $|0_S\rangle$ and the logical $|1_S\rangle$ as a superposition of eight states in the canonical basis. The simplest toric code worth thinking about is the $3\times 3$. There are eighteen qubits, and in what you call "standard notation" each of the logical $|0_L\rangle$ and logical $|1_L\rangle$ states is a superposition of something like $2^{16}$ states in the canonical basis. You really don't want an answer that writes them all down explicitly. – Peter Shor Jun 11 '16 at 19:29