  We present a protocol to encode and decode arbitrary quantum states in the
parity architecture with constant circuit depth using measurements, local
nearest-neighbor and single-qubit operations only. While this procedure
typically requires a quadratic overhead of simultaneous qubit measurements, it
allows for a simple and low-depth implementation of logical multi-qubit gates
in the parity encoding via code deformation. We discuss how such encoding and
decoding schemes can be used to flexibly change the size and shape of the
underlying code to enable a more efficient implementation of quantum gates or
algorithms. We apply the new findings to the QAOA which leads to a constant
depth implementation using local gates at the same optimization performance as
the standard, potentially non-local, QAOA approach without the parity encoding.
Furthermore, we show that our method can reduce the depth of implementing the
quantum Fourier transform by a factor of two when allowing measurements.
