  Given their potential for fault-tolerant operations, topological quantum
states are currently the focus of intense activity. Of particular interest are
topological quantum error correction codes, such as the surface and planar
stabilizer codes that are equivalent to the celebrated toric code. While every
stabilizer state maps to a graph state under local Clifford operations, the
graphs associated with topological stabilizer codes remain unknown. We show
that the toric code graph is composed of only two kinds of subgraphs: star
graphs (which encode Greenberger-Horne-Zeilinger states) and half graphs. The
topological order is identified with the existence of multiple star graphs,
which reveals a connection between the repetition and toric codes. The graph
structure readily yields a log-depth quantum circuit for state preparation,
assuming geometrically non-local gates, which can be reduced to a constant
depth including ancillae and measurements at the cost of increasing the circuit
width. The results provide a new graph-theoretic framework for the
investigation of topological order and the development of novel topological
error correction codes.
