  Gottesman-Kitaev-Preskill (GKP) states appear to be amongst the leading
candidates for correcting errors when encoding qubits into oscillators. However
the preparation of GKP states remains a significant theoretical and
experimental challenge. Until now, no clear definitions for fault-tolerantly
preparing GKP states have been provided. Without careful consideration, a small
number of faults can lead to large uncorrectable shift errors. After proposing
a metric to compare approximate GKP states, we provide rigorous definitions of
fault-tolerance and introduce a fault-tolerant phase estimation protocol for
preparing such states. The fault-tolerant protocol uses one flag qubit and
accepts only a subset of states in order to prevent measurement readout errors
from causing large shift errors. We then show how the protocol can be
implemented using circuit QED. In doing so, we derive analytic expressions
which describe the leading order effects of the non-linear dispersive shift and
Kerr non-linearity. Using these expressions, we show that to mitigate the
non-linear dispersive shift and Kerr terms would require the protocol to be
implemented on time scales four orders of magnitude longer than the time scales
relevant to the protocol for physically motivated parameters. Despite these
restrictions, we numerically show that a subset of the accepted states of the
fault-tolerant phase estimation protocol maintain good error correcting
capabilities even in the presence of noise.
