  Given some group $G$ of logical gates, for instance the Clifford group, what
are the quantum encodings for which these logical gates can be implemented by
simple physical operations, described by some physical representation of $G$?
We study this question by constructing a general form of such encoding maps.
For instance, we recover that the $[[5,1,3]]$ and Steane codes admit
transversal implementations of the binary tetrahedral and binary octahedral
groups, respectively. For bosonic encodings, we show how to obtain the GKP and
cat qudit encodings by considering the appropriate groups, and essentially the
simplest physical implementations. We further illustrate this approach by
introducing a 2-mode bosonic code defined from a constellation of 48 coherent
states, for which all single-qubit Clifford gates correspond to passive
Gaussian unitaries.
