  Designs for quantum error correction depend strongly on the connectivity of
the qubits. For solid state qubits, the most straightforward approach is to
have connectivity constrained to a planar graph. Practical considerations may
also further restrict the connectivity, resulting in a relatively sparse graph
such as the heavy-hex architecture of current IBM Quantum devices. In such
cases it is hard to use all qubits to their full potential. Instead, in order
to emulate the denser connectivity required to implement well-known quantum
error correcting codes, many qubits remain effectively unused. In this work we
show how this bug can be turned into a feature. By using the unused qubits of
one code to execute another, two codes can be implemented on top of each other,
allowing easy application of fault-tolerant entangling gates and measurements.
We demonstrate this by realizing a surface code and a Bacon-Shor code on a 133
qubit IBM Quantum device. Using transversal CX gates and lattice surgery we
demonstrate entanglement between these logical qubits with code distance up to
$d = 4$ and five rounds of stabilizer measurement cycles. The nonplanar
coupling between the qubits allows us to simultaneously measure the logical
$XX$, $YY$, and $ZZ$ observables. With this we verify the violation of Bell's
inequality for both the $d=2$ case with post selection featuring a fidelity of
$94\%$, and the $d=3$ instance using only quantum error correction.
