  We ask what is the general framework for a quantum error correcting code that
is defined by a sequence of measurements. Recently, there has been much
interest in Floquet codes and space-time codes. In this work, we define and
study the distance of a dynamical code. This is a subtle concept and difficult
to determine: At any given time, the system will be in a subspace which forms a
quantum error-correcting code with a given distance, but the full error
correction capability of that code may not be available due to the schedule of
measurements associated with the code. We address this challenge by developing
an algorithm that tracks information we have learned about the error syndromes
through the protocol and put that together to determine the distance of a
dynamical code, in a non-fault-tolerant context. We use the tools developed for
the algorithm to analyze the initialization and masking properties of a generic
Floquet code. Further, we look at properties of dynamical codes under the
constraint of geometric locality with a view to understand whether the
fundamental limitations on logical gates and code parameters imposed by
geometric locality for traditional codes can be surpassed in the dynamical
paradigm. We find that codes with a limited number of long range connectivity
will not allow non-Clifford gates to be implemented with finite depth circuits
in the 2D setting.
