  Quantum error-correcting codes are many-body entangled states that are
prepared and measured using complex sequences of entangling operations. Each
element of such an entangling sequence introduces noise to delicate quantum
information during the encoding or reading out of the code. It is important
therefore to find efficient entangling protocols to avoid the loss of
information. Here we propose an experiment that uses only global entangling
operations to encode an arbitrary logical qubit to either the five-qubit
repetition code or the five-qubit code, with a six-ion Coulomb crystal
architecture in a Penning trap. We show that the use of global operations
enables us to prepare and read out these codes using only six and ten global
entangling pulses, respectively. The proposed experiment also allows the
acquisition of syndrome information during readout. We provide a noise analysis
for the presented protocols, estimating that we can achieve a six-fold
improvement in coherence time with noise as high as $\sim 1\%$ on each
entangling operation.
