Quantum error-correcting codes are constructed that embed a finite-dimensio
nal code space in the infinite-dimensional Hilbert space of a system descri
bed by continuous quantum variables. These codes exploit the noncommutative
geometry of phase space to protect against errors that shift the values of
the canonical variables q and p. In the setting of quantum optics, fault-t
olerant universal quantum computation can be executed on the protected code
subspace using linear optical operations, squeezing, homodyne detection, a
nd photon counting; however, nonlinear mode coupling is required for the pr
eparation of the encoded states. Finite-dimensional versions of these codes
can be constructed that protect encoded quantum information against shifts
in the amplitude or phase of a d-state system. Continuous-variable codes c
an be invoked to establish lower bounds on the quantum capacity of Gaussian
quantum channels.