  We introduce a theory of quantum error correction (QEC) for a subclass of
states within a larger Hilbert space. In the standard theory of QEC, the set of
all encoded states is formed by an arbitrary linear combination of the
codewords. However, this can be more general than required for a given quantum
protocol which may only traverse a subclass of states within the Hilbert space.
Here we propose the concept of nonlinear QEC (NLQEC), where the encoded states
are not necessarily a linear combination of codewords. We introduce a
sufficiency criterion for NLQEC with respect to the subclass of states. The new
criterion gives a more relaxed condition for the formation of a QEC code, such
that under the assumption that the states are within the subclass of states,
the errors are correctable. This allows us, for instance, to effectively
circumvent the no-go theorems regarding optical QEC for Gaussian states and
channels, for which we present explicit examples.
