We propose to encode a register of quantum bits in different collective electron spin wave excitations in a solid medium. Coupling to spins is enabled by locating them in the vicinity of a superconducting transmission line cavity, and making use of their strong collective coupling to the quantized radiation field. The transformation between different spin waves is achieved by applying gradient magnetic fields across the sample, while a Cooper Pair Box, resonant with the cavity field, may be used to carry out one- and two-qubit gate operations.