  Graphs and recently hypergraphs have been known as an important tool for
considering different properties of quantum many-body systems. In this paper,
we study a mapping between an important class of quantum systems namely quantum
Calderbank-Shor-Steane (CSS) codes and Ising-like systems by using hypergraphs.
We show that the Hamiltonian corresponding to a CSS code on a hypergraph $H$
which is perturbed by a uniform magnetic field is mapped to Hamiltonian of a
Ising-like system on dual hypergraph $\tilde{H}$ in a transverse field.
Interestingly, we show that a strong regime of couplings in one of the systems
is mapped to a weak regime of couplings in another one. We also give some
applications for such a mapping where we study robustness of different
topological CSS codes against a uniform magnetic field including Kitaev's toric
codes defined on graphs and color codes in different dimensions. We show that a
perturbed Kitaev's toric code on an arbitrary graph is mapped to an Ising model
in a transverse field on the same graph and a perturbed color code on a D-colex
is mapped to a Ising-like model on a D-simplicial lattice in a transverse
field. In particular, we use these results to explicitly compare the robustness
of TC on different graphs in different dimensions. Interestingly, our results
show that the robustness of such topological codes defined on graphs decreases
with increasing dimension. Furthermore, we also use the duality mapping for
some self-dual models where we exactly derive the point of phase transition.
