  We build and probe a $\mathbb{Z}_2$ spin liquid in a programmable quantum
device, the D-Wave DW-2000Q. Specifically, we observe the classical 8-vertex
and 6-vertex (spin ice) states and transitions between them. To realize this
state of matter, we design a Hamiltonian with combinatorial gauge symmetry
using only pairwise-qubit interactions and a transverse field, i.e.,
interactions which are accessible in this quantum device. The combinatorial
gauge symmetry remains exact along the full quantum annealing path, landing the
system onto the classical 8-vertex model at the endpoint of the path. The
output configurations from the device allows us to directly observe the loop
structure of the classical model. Moreover, we deform the Hamiltonian so as to
vary the weights of the 8 vertices and show that we can selectively attain the
classical 6-vertex (ice) model, or drive the system into a ferromagnetic state.
We present studies of the classical phase diagram of the system as function of
the 8-vertex deformations and effective temperature, which we control by
varying the relative strengths of the programmable couplings, and we show that
the experimental results are consistent with theoretical analysis. Finally, we
identify additional capabilities that, if added to these devices, would allow
us to realize $\mathbb{Z}_2$ quantum spin liquids on which to build topological
qubits.
