  Deciding if a given family of quantum states is topologically ordered is an
important but nontrivial problem in condensed matter physics and quantum
information theory. We derive necessary and sufficient conditions for a family
of graph states to be in TQO-1, which is a class of quantum error correction
code states whose code distance scales macroscopically with the number of
physical qubits. Using these criteria, we consider a number of specific graph
families, including the star and complete graphs, and the line graphs of
complete and completely bipartite graphs, and discuss which are topologically
ordered and how to construct the codewords. The formalism is then employed to
construct several codes with macroscopic distance, including a
three-dimensional topological code generated by local stabilizers that also has
a macroscopic number of encoded logical qubits. The results indicate that graph
states provide a fruitful approach to the construction and characterization of
topological stabilizer quantum error correction codes.
