We propose to encode a quantum bit of information in a superposition of coherent states of an oscillator,
with four different phases. Our encoding in a single cavity mode, together with a protection protocol,
significantly reduces the error rate due to photon loss. This protection is ensured by an efficient quantum
error correction scheme employing the nonlinearity provided by a single physical qubit coupled to the
cavity. We describe in detail how to implement these operations in a circuit quantum electrodynamics
system. This proposal directly addresses the task of building a hardware-efficient quantum memory and
can lead to important shortcuts in quantum computing architectures.