Bosonic quantum Fourier codes Anthony Leverrier Abstract While 2-level systems, aka qubits, are a natural choice to perform a logical quantum computation, the situation is less clear at the physical level. Encoding information in higher-dimensional physical systems can indeed provide a first level of redundancy and error correction that simplifies the overall fault-tolerant architecture. A challenge then is to ensure universal control over the encoded qubits. Here, we explore an approach where information is encoded in an irreducible representation of a finite subgroup of U ⁡ ( 2 ) U(2) through an inverse quantum Fourier transform. We illustrate this idea by applying it to the real Pauli group ⟨ X , Z ⟩ \langle X,Z\rangle in the bosonic setting. The resulting two-mode Fourier cat code displays good error correction properties and admits an experimentally-friendly universal gate set that we discuss in detail. 1 Introduction Years of theoretical advances on quantum error correction and fault tolerance have uncovered a fundamental tension between information processing and error correction in quantum encoding schemes: information well protected against relevant sources of imperfection tends to be difficult to manipulate. The difficulty to combine error correction capabilities and a fault-tolerant manipulation of the logical information is exemplified by the Eastin-Knill theorem: logical gates of a quantum code admitting a transversal implementation cannot form a universal gate set [ 1 ] . Infinite-dimensional systems such as bosonic modes are a natural playground to try to evade this restriction and form a promising avenue towards reducing the cost of fault tolerance. For instance, the cat code [ 2 ] offers an intrinsic protection against bit flips and one can then turn to classical error correction to fight phase errors [ 3 ] . More generally, an appealing architecture for fault-tolerant quantum computing would rely on a concatenation of a bosonic encoding with a quantum LDPC code [ 4 , 5 ] . Pushing the idea even further, one could even envision a purely bosonic encoding without any concatenation, e.g. with tiger codes [ 6 ] . Recent experimental progress towards demonstrating cat [ 7 , 8 , 9 ] or GKP [ 10 , 11 , 12 ] encodings is particularly encouraging and suggests to look for potential alternative bosonic codes that would combine a good resistance to loss with a universal gate set. There exist many possible bosonic encodings of a single qubit: the dual-rail encoding [ 13 ] involves a single photon in two bosonic modes |1\rangle|0\rangle and |0\rangle|1\rangle , the cat qubit exploits superpositions of two simple coherent states |\alpha\rangle\pm|-\alpha\rangle , the GKP code [ 14 ] relies on more complex grid states and offers better protection at the price of a more complex implementation. Many other candidates exist, ranging from the pair-cat code [ 15 ] to binomial codes [ 16 ] , rotation symmetric codes [ 17 ] and multimode spherical codes [ 18 ] . In general, the approach to design a new code is to focus first on protecting against the most relevant sources of imperfections (typically loss in the bosonic setting) and then understanding how to perform logical gates in a fault-tolerant fashion. By contrast, one could equally well focus on encodings where some gates are naturally fault tolerant and only then optimize their error correction capabilities. This strategy was pioneered by Gross for spin encodings [ 19 ] and also explored by Kubischta and Teixeira for multiqubit codes [ 20 , 21 ] and Denys and Leverrier for bosonic codes [ 22 ] . The idea behind this last work is that starting with a finite group G\subset U(2) and a “nice” physical representation \pi of that group on the relevant physical space, it is possible to systematically obtain all the covariant encodings , i.e. those with the property that applying \pi(g) on the physical state implements the gate g\in G at the logical level. The goal of the present paper is to explore in more detail a specific instance of such a code, where the encoding unitary is the inverse quantum Fourier transform of the group. Interestingly, it turns out that it encodes 2 qubits with very distinct properties. We think of the first one as our logical qubit, for which we want universal control, and of the second one as a gauge or auxiliary qubit useful to implement gates on the first qubit. We formalize this quantum Fourier encoding in Section 2 before focusing in detail on the simplest possible nontrivial instance of the construction, based on the Pauli group G=\langle X,Z\rangle with the natural passive Gaussian unitary representation \pi on two bosonic modes: the gate \pi(X) simply swaps the two modes and \pi(Z)=(-1)^{\hat{n}_{2}} applies a \pi phase on the second mode. We present a universal gate set for the logical qubit in Section 3 . In particular, the implementation of the Hadamard gate crucially relies on a code deformation technique involving the second encoded qubit. We discuss the error correction properties of the encoding in Section 4 . 2 The framework and comparison with other bosonic codes 2.1 Quantum Fourier codes Consider a finite subgroup G\subset U(d) and its associated quantum Fourier transform [ 23 ] : \displaystyle F_{G}:=\sum_{g\in G}\sum_{\rho\in\hat{G}}\sqrt{\frac{d_{\rho}}{|G|}}\sum_{\ell,m=1}^{d_{\rho}}\langle\ell|\rho(g)|m\rangle\>|\rho,\ell,m\rangle\langle g|, (1) where \hat{G} is the set of inequivalent irreducible representations of G , and the states |g\rangle labeled by group elements are assumed to be orthonormal. Here, \rho is an irreducible representation of the group of dimension d_{\rho} and the definition of F_{G} depends on a choice of orthonormal basis \{|\rho,\ell,m\rangle\>:\>1\leq\ell,m\leq d_{\rho}\}\subset\mathbbm{C}^{d_{\rho}}\otimes\mathbbm{C}^{d_{\rho}} for each irreducible representation of dimension greater than 1. If we define the left and right regular representations \mathcal{L} and \mathcal{R} of the group as: \displaystyle\mathcal{L}(g)|h\rangle=|gh\rangle,\qquad\mathcal{R}(g)|h\rangle=|hg^{-1}\rangle, (2) then the quantum Fourier transform is the unitary that simultaneously diagonalizes both the left and right regular transformations: for all g\in G , \displaystyle F_{G}\mathcal{L}(g)F_{G}^{\dagger}=\bigoplus_{\rho\in\hat{G}}(\rho(g)\otimes\mathbbm{1}_{d_{\rho}}),\qquad F_{G}\mathcal{R}(g)F_{G}^{\dagger}=\bigoplus_{\rho\in\hat{G}}(\mathbbm{1}_{d_{\rho}}\otimes\rho(g)). (3) In the following, we will choose the d -dimensional defining representation of U(d) , denoted by \lambda , and will often write g instead of \lambda(g) when there is no ambiguity. We denote by L and M the two d -dimensional factors of the space spanned by |\lambda,\ell,m\rangle . These two registers will be our logical and multiplicity registers, respectively. with uni When the left regular representation is easy to implement for some system, it makes sense to try to encode information in the logical register L , and to use the multiplicity register M as some gauge register. We therefore define an encoding map \mathcal{E}:L\otimes M\to\mathrm{Span}(|g\rangle\>:\>g\in G) : \displaystyle\mathcal{E}:|\ell\rangle\otimes|m\rangle\quad\mapsto\quad \displaystyle F_{G}^{\dagger}|\lambda,\ell,m\rangle=\sqrt{\frac{d}{|G|}}\sum_{g\in G}\langle m|\lambda(g)^{\dagger}|\ell\rangle|g\rangle. (4) We abuse notation and also write L and M for their image by \mathcal{E} . By construction, this encoding guarantees that the physical gate \mathcal{L}(g) implements a logical operation \lambda(g) on the logical register: \displaystyle\mathcal{L}(g)\mathcal{E}(|\ell\rangle|m\rangle)=\mathcal{L}(g)F_{G}^{\dagger}|\lambda,\ell,m\rangle=F_{G}^{\dagger}(F_{G}\mathcal{L}(g)F_{G}^{\dagger})|\lambda,\ell,m\rangle=\mathcal{E}(\lambda(g)|\ell\rangle\otimes|m\rangle). (5) It may not be obvious at first sight that there are natural settings where the states |g\rangle are easy to prepare and the operations \mathcal{L}(g) are easy to implement. But this is the case and bosonic codes provide a particularly nice illustration. For instance, if the group G admits a d -dimensional unitary representation \lambda , one can consider an arbitrary d -mode coherent state |\boldsymbol{\alpha}\rangle=|\alpha_{1},\ldots,\alpha_{d}\rangle such that the vectors \lambda(g)\boldsymbol{\alpha} are all distinct, and the physical representation \pi of G corresponding to passive Gaussian unitaries defined by \displaystyle\pi(g)|\boldsymbol{\alpha}\rangle=|\lambda(g)\boldsymbol{\alpha}\rangle,\quad\forall g\in G. (6) Here, \pi(g) is a unitary Gaussian operator of the d -mode bosonic Hilbert space. It is well known that the coherent states |g\boldsymbol{\alpha}\rangle (we omit \lambda for conciseness) are not orthogonal, but they are linearly independent when the group G is finite. One can readily obtain an orthonormal basis labeled by the group elements: \displaystyle|g\rangle:=\sum_{h\in G}[\Gamma^{-1/2}]_{h,g}|h\boldsymbol{\alpha}\rangle, (7) where \Gamma is the Gram matrix of the family \{|g\boldsymbol{\alpha}\rangle\} , namely [\Gamma]_{g,h}=\langle g\boldsymbol{\alpha}|h\boldsymbol{\alpha}\rangle . To see this, \displaystyle\langle g|h\rangle \displaystyle=\sum_{k,\ell}[\Gamma^{-1/2}]_{gk}[\Gamma^{-1/2}]_{\ell h}\langle k\boldsymbol{\alpha}|\ell\boldsymbol{\alpha}\rangle=\sum_{k,\ell}[\Gamma^{-1/2}]_{gk}[\Gamma^{-1/2}]_{\ell h}\Gamma_{k\ell}=\delta_{g,h}. The representation \pi acts like the left regular representation on these states: \displaystyle\pi(g)|h\rangle \displaystyle=\sum_{k\in G}[\Gamma^{-1/2}]_{k,h}|gk\boldsymbol{\alpha}\rangle=\sum_{k\in G}[\Gamma^{-1/2}]_{gk,gh}|gk\boldsymbol{\alpha}\rangle=|gh\rangle=\mathcal{L}(g)|h\rangle (8) where the second equality follows from the fact that the Gram matrix and its powers commute with \pi(g) . We arrive at the definition of the quantum Fourier encoding \mathcal{E}(|\ell\rangle|m\rangle) of |\ell\rangle|m\rangle\in L\otimes M , that we also denote by |\widehat{\ell,m}\rangle : \displaystyle|\widehat{\ell,m}\rangle:=\sum_{g\in G}[\Gamma^{-1/2}F_{G}^{\dagger}]_{g,\lambda\ell m}|g\boldsymbol{\alpha}\rangle. (9) By ( 4 ) and ( 8 ), we know that \pi acts similarly to the left regular representation for this state, and ( 5 ) implies that for any group element, \pi(g) implements the logical gate \lambda(g) on the logical register L . It is tempting to consider a large subgroup of U(d) because the corresponding logical gates are easy to implement by construction. However, this leads to more complicated code states that might be delicate to prepare. Note that the quantum Fourier code is very similar to the covariant encoding of [ 22 ] which applies the inverse quantum Fourier transform directly to the coherent states |g\boldsymbol{\alpha}\rangle instead of the orthonormal states |g\rangle , and picks an arbitrary state |\Omega\rangle\in M . Up to a global normalization, the encoded qudit in [ 22 ] is given by \displaystyle|\overline{\ell}\rangle\propto\sum_{g\in G}[F^{\dagger}]_{g,\lambda\ell\Omega}|g\boldsymbol{\alpha}\rangle. (10) A feature of the Fourier code that we consider here is that it also stores information in the multiplicity space. This extra degree of freedom will be useful to design a universal set of operations for the logical qudit. 2.2 The two-mode Fourier cat code The relevant groups for applying the Fourier encodings are the noncommutative ones. This is because all the irreducible representations of an abelian group are one-dimensional, preventing one from encoding a nontrivial logical system in a single irreducible representation. For instance, rotation symmetric bosonic codes such as the cat qudit encoding encode the logical basis codewords in different irreducible representations of the group \mathbbm{Z}_{N} , as detailed in Appendix A . By contrast, we focus here on a noncommutative group G and the simplest example may be the real Pauli group G=\langle X,Z\rangle=\{\pm\mathbbm{1},\pm X,\pm Z,\pm XZ\}\subset U(2) . It admits 5 inequivalent irreducible representations: four of them are one-dimensional and the standard defining representation \lambda is 2-dimensional: \lambda(X)=\left[\begin{smallmatrix}0&1\\ 1&0\end{smallmatrix}\right],\lambda(Z)=\left[\begin{smallmatrix}1&0\\ 0&-1\end{smallmatrix}\right] . One could pick any 2-mode coherent state to instantiate the construction. It turns out, however, that not all coherent states are born equal and we will choose |\boldsymbol{\alpha}\rangle=|\alpha,i\alpha\rangle with \alpha=\sqrt{\pi/2} in the following. This ensures that the even cat states |0_{\alpha}\rangle\propto|\alpha\rangle+|-\alpha\rangle and |0_{i\alpha}\rangle\propto|i\alpha\rangle+|-i\alpha\rangle and odd cat states |1_{\alpha}\rangle\propto|\alpha\rangle-|-\alpha\rangle and |1_{i\alpha}\rangle\propto|i\alpha\rangle-|-i\alpha\rangle are orthogonal. Moreover, for this value, the Gram matrix \Gamma of the family \{|g\boldsymbol{\alpha}\rangle\>:\>g\in G\} is diagonalized by the Fourier transform of the group, and the restriction of F\Gamma F^{\dagger} to the irreducible representation \lambda is a scalar. As a consequence, the four codestates |\widehat{\ell,m}\rangle are products of single-mode cat states: \displaystyle|\widehat{0,0}\rangle=|1_{\alpha}\rangle|0_{i\alpha}\rangle,\quad|\widehat{0,1}\rangle=|1_{i\alpha}\rangle|0_{\alpha}\rangle,\quad|\widehat{1,0}\rangle=|0_{i\alpha}\rangle|1_{\alpha}\rangle,\quad|\widehat{1,1}\rangle=|0_{\alpha}\rangle|1_{i\alpha}\rangle. (11) In particular, when the state of the multiplicity qubit is |0\rangle , the logical code states |\widehat{\ell,0}\rangle coincide with those of the covariant encoding of [ 22 ] given in ( 10 ). By construction, the SWAP operator \pi(X) that exchanges both modes performs a logical X_{L} on the first qubit, while the phase-flip (-1)^{\hat{n}_{2}}=\pi(Z) performs a logical Z_{L} since it leaves even cat states invariant and adds a phase -1 to odd cat states. As already hinted at, even if this formally encodes 2 qubits, the idea is to promote the first one to be the true logical qubit while the second qubit (corresponding to the multiplicity space M\cong\mathbbm{C}^{2}) will serve as an extra-register useful to implement specific gates. From the expression of the logical codestates in ( 11 ), one can infer that the codespace manifold lies in the kernel of the Lindblad operators \hat{a}_{1}^{4}-\alpha^{4} and \hat{a}_{1}^{2}\hat{a}_{2}^{2}+\alpha^{4} , or alternatively by \hat{a}_{1}^{4}-\alpha^{4} and \hat{a}_{1}^{2}+\hat{a}_{2}^{2} , and is stabilized by (-1)^{\hat{n}_{1}+\hat{n}_{2}+1} enforcing that the total photon number parity is odd. These operators are similar to those of various alternative cat encodings. They are summarized in Table 1 . Stabilizers, Lindblad operators, logical states of cat-type bosonic codes 4-legged cat 2-repetition cat pair-cat [ 15 ] 2-mode Fourier Stabilizers \hat{n}\mod 2 \hat{n}_{1}-\hat{n}_{2}\mod 2 \hat{n}_{1}-\hat{n}_{2} \hat{n}_{1}-\hat{n}_{2}\mod 2 Lindblad operators \hat{a}^{4}-\alpha^{4} \hat{a}_{1}^{2}-\alpha^{2} \hat{a}_{2}^{2}-\alpha^{2} \hat{a}_{1}^{2}\hat{a}_{2}^{2}-\alpha^{4} \hat{a}_{1}^{4}-\alpha^{4} \hat{a}_{1}^{2}\hat{a}_{2}^{2}+\alpha^{4} |0\rangle_{L} |0_{\alpha}\rangle |0_{\alpha}\rangle\,|0_{\alpha}\rangle \displaystyle\int_{0}^{\pi}|0_{\alpha e^{i\theta}}\rangle\,|0_{\alpha e^{-i\theta}}\rangle\,d\theta |1_{\alpha}\rangle\,|0_{i\alpha}\rangle, |1_{i\alpha}\rangle\,|0_{\alpha}\rangle |1\rangle_{L} |0_{i\alpha}\rangle |1_{\alpha}\rangle\,|1_{\alpha}\rangle \displaystyle\int_{0}^{\pi}|1_{\alpha e^{i\theta}}\rangle\,|1_{\alpha e^{-i\theta}}\rangle\,d\theta |0_{i\alpha}\rangle\,|1_{\alpha}\rangle, |0_{\alpha}\rangle\,|1_{i\alpha}\rangle Table 1: For the 4-legged cat qubit and the two-mode Fourier code, the expressions of the logical states hold for the specific case with \alpha=\sqrt{\frac{\pi}{2}} . Note that the two logical states of the 4-legged cat are also first order approximations of the logical GKP states (keeping only 2 states in the coherent state basis expansion). The Lindblad operators of the two-mode Fourier code combine those of the 4-legged cat qubit and the pair-cat. Before analyzing in more detail the two-mode Fourier cat code, it is insightful to compare it with other bosonic codes. Among single-mode encodings, rotation-symmetric bosonic codes [ 17 ] (including the standard cat qubit) are closely related and encode information in several irreducible representations of the abelian group \mathbbm{Z}_{N} . They share similar implementations with the two-mode Fourier code for the logical gates S and CZ , relying respectively on self-Kerr and cross-Kerr interaction. Moreover, the Fourier code can correct a single-photon loss, exactly as the 4-legged cat qubit [ 24 ] . A major distinction is that the cat qubit is heavily biased, which is not the case of the Fourier code. At the other end of the spectrum, the GKP code [ 14 , 25 ] offers optimal performance against loss, and has the remarkable feature that all the logical Clifford gates can be implemented with Gaussian unitaries. The price to pay is the complexity of the state preparation and stabilization [ 26 ] . It is also possible to encode a qubit in two bosonic modes. The dual-rail encoding does that with a single-photon. In that case, the representation \pi of the group U(2) on the 2-mode Fock space restricts to the defining representation \lambda on the space spanned by single-photon states. All logical single-qubit gates can therefore be implemented with passive Gaussian unitaries. A drawback of this approach is that it cannot correct a single-photon loss, only detect it. The two-mode binomial code generalizes the dual-rail encoding to improve loss tolerance, with more complicated code states [ 27 ] . Recently, the pair-cat code was also introduced [ 15 ] and has the advantage that measuring the loss error syndrome can be done without turning off the dissipation (which shares a Lindblad operator with the Fourier code: see Table 1 ). When there’s no gain in the channel, the pair-cat code can also correct a single-photon loss on an arbitrary mode. An alternative two-mode code is to concatenate a cat qubit with a repetition code of length 2. This 2-repetition cat encoding can detect a single-photon loss. Finally, the two-mode Fourier encoding is closely related to the covariant code of [ 22 ] which only encodes a single qubit. As detailed in Section 3 , the 2-qubit code space is instrumental to the design of the logical Hadamard gate for the two-mode Fourier code. 3 A universal gate set By construction, the gates from the group G are easy to obtain through the physical representation \pi . When G=\langle X,Z\rangle , this only gives Pauli operators, however, which are insufficient for universal quantum computing. One also needs the ability to prepare some states, perform measurements, as well as Clifford and non-Clifford gates. For our specific choice of initial state |\alpha\rangle|i\alpha\rangle , the computational basis states are products of two single-mode cat states, which are now routinely prepared in the lab. Measuring the logical state in the Z basis can be done by performing a photon parity measurement since |0\rangle_{L} has an odd number of photons in the first mode and even in the second mode, while the opposite holds for the state |1\rangle_{L} . Measuring the operator Y_{M} is also possible by measuring photon numbers modulo 4. Kerr interactions yield some Clifford gates, namely the phase gate S and the CZ gate, similarly to what is done for rotation-symmetric codes. The implementation of the Hadamard gate is more original. Applying \pi(H) is a code deformation: the gate H_{L}H_{M} is applied to both qubits, but the code is deformed to an equivalent code (a two-mode Fourier cat code with initial state |e^{i\pi/4}\alpha\rangle|e^{-i\pi/4}\alpha\rangle instead of |\alpha\rangle|i\alpha\rangle ). One can alternate between this gate and a phase gate to obtain a Hadamard gate H_{L} applied only to the logical qubit. Finally, the gate e^{i\theta Z_{L}Z_{M}} is obtained thanks to the quantum Zeno effect [ 2 ] with a quadratic Hamiltonian drive \hat{a}^{2}+\hat{a}^{{\dagger}2} . Provided that the state of the multiplicity qubit is fixed to |0\rangle or |1\rangle , this yields a gate e^{i\theta Z_{L}} , thereby completing a universal gate set for the logical qubit. These possible implementations are detailed in the remainder of this section, and Table 2 provides a summary. Physical implementation of logical operations logical operations possible physical implementations state preparation: \mathcal{P}_{|\ell\rangle|m\rangle} prepare two single-mode cat states logical measurement: \mathcal{M}_{Z_{L}} photon parity measurement in either mode 2-qubit measurement: \mathcal{M}_{Z_{L}Y_{M}} photon measurement modulo 4 in both modes logical Pauli gates: X_{L} , Z_{L} SWAP, (-1)^{\hat{n}_{2}} X_{M}Z_{M} -i^{\hat{n}_{1}+\hat{n}_{2}} phase gate S_{L} (i) self-Kerr i^{\hat{n}_{2}^{2}} (ii) SNAP gate H_{L}H_{M} balanced beamsplitter \pi(H) through code deformation H_{L}=S_{L}(H_{L}H_{M})S_{L}(H_{L}H_{M})S_{L} alternate self-Kerr i^{\hat{n}_{2}^{2}} and beamsplitter \pi(H) entangling gate CZ_{L_{1}L_{2}} cross-Kerr interaction (-1)^{\hat{n}_{2}\hat{n}_{4}} e^{i\theta Z_{L}Z_{M}} quantum Zeno effect with drive \hat{a}_{1}^{2}+\hat{a}_{1}^{{\dagger}2} T -state preparation \mathcal{P}_{|T\rangle|0\rangle} prepare |+\rangle with Hadamard, followed by quantum Zeno effect T_{L} quantum Zeno effect, with |\psi\rangle_{M}\in\{|0\rangle,|1\rangle\} SNAP gate Table 2: Possible implementation of a universal set of logical operations for the logical qubit of the two-mode Fourier cat code. 3.1 Gates in N(G) through code deformation An original feature of the encoding occurs when G\subsetneq N(G) , i.e. when the normalizer of G (ignoring global phases) is strictly larger than G . This is the case for instance with the group G=\langle X,Z\rangle since N(G)=\langle X,Z,H\rangle contains the Hadamard gate. We recall that the defining representation \lambda and the physical representation \pi extend to the whole unitary group U(2) . The idea to implement the logical gate \lambda(U) (that we denote by U for simplicity) is to perform the physical operation \pi(U) . In general, this does not leave the codespace invariant. Rather, we show that it induces a logical gate on both encoded qubits and deforms the Fourier code: the final state lives in the Fourier code with encoding map \mathcal{E}_{U} obtained by replacing the initial coherent state |\boldsymbol{\alpha}\rangle with |U\boldsymbol{\alpha}\rangle . This is formalized in the following lemma. Lemma 1 . For any gate U\in N(G) , \displaystyle\pi(U)\ \mathcal{E}(|\ell\rangle|m\rangle)=\mathcal{E}_{U}(U|\ell\rangle\otimes U|m\rangle). (12) Proof. Consider U\in N(G) and apply \pi(U) to an encoded state \displaystyle\pi(U)|\widehat{\ell,m}\rangle \displaystyle=\sum_{g,h\in G}[\Gamma^{-1/2}]_{g,h}\langle m|g^{\dagger}|\ell\rangle\pi(U)|h\boldsymbol{\alpha}\rangle \displaystyle=\sum_{g,h\in G}[\Gamma^{-1/2}]_{g,h}\langle m|g^{\dagger}|\ell\rangle\pi(UhU^{\dagger})|U\boldsymbol{\alpha}\rangle \displaystyle=\sum_{g^{\prime},h^{\prime}\in G}[\Gamma^{-1/2}]_{U^{\dagger}g^{\prime}U,U^{\dagger}h^{\prime}U}\langle m|U^{\dagger}{g^{\prime}}^{\dagger}U|\ell\rangle\pi(h^{\prime})|U\boldsymbol{\alpha}\rangle (13) \displaystyle=\sum_{g^{\prime},h^{\prime}\in G}[\Gamma_{U}^{-1/2}]_{g^{\prime},h^{\prime}}\langle m|U^{\dagger}{g^{\prime}}^{\dagger}U|\ell\rangle\pi(h^{\prime})|U\boldsymbol{\alpha}\rangle (14) \displaystyle=\mathcal{E}_{U}(U|\ell\rangle\otimes U|m\rangle) where we define [\Gamma_{U}]_{g,h}=\langle U^{\dagger}gU\boldsymbol{\alpha}|U^{\dagger}hU\boldsymbol{\alpha}\rangle=\langle gU\boldsymbol{\alpha}|hU\boldsymbol{\alpha}\rangle to be the Gram matrix associated with the family \{|gU\boldsymbol{\alpha}\rangle\>:\>g\in G\} and \mathcal{E}_{U} is the quantum Fourier encoding using the constellation induced by |U\boldsymbol{\alpha}\rangle rather than |\boldsymbol{\alpha}\rangle . The change of variables in ( 13 ) is valid since UgU^{\dagger},UhU^{\dagger}\in G for U\in N(G) . To prove ( 14 ), observe that \displaystyle[\Gamma]_{U^{\dagger}gU,U^{\dagger}hU} \displaystyle=\langle U^{\dagger}gU\boldsymbol{\alpha}|U^{\dagger}hU\boldsymbol{\alpha}\rangle=\langle gU\boldsymbol{\alpha}|hU\boldsymbol{\alpha}\rangle=[\Gamma_{U}]_{g,h}. The matrices \Gamma and \Gamma_{U} are thus related through \Gamma_{U}=P\Gamma P^{\dagger} for the permutation matrix P with P_{g,g^{\prime}}=\delta_{g^{\prime},U^{\dagger}gU} . Since \Gamma is positive semidefinite and P is a unitary, applying the inverse square root gives \Gamma_{U}^{-1/2}=P\Gamma^{-1/2}P^{\dagger} and therefore [\Gamma^{-1/2}]_{U^{\dagger}gU,U^{\dagger}hU}=[\Gamma_{U}^{-1/2}]_{g,h} , as needed. ∎ In the case of the group \langle X,Z\rangle , the application of the gate \pi(H) , a balanced beamsplitter operation, implements the logical operation H_{L}H_{M} and maps the code from \mathrm{Im}(\mathcal{E}) to \mathrm{Im}(\mathcal{E}_{U}) . It is also very useful to get a gate that only applies a Hadamard gate on the logical qubit while leaving the multiplicity qubit alone. This is obtained thanks to the gate identity \displaystyle SHSHS=e^{i\pi/4}H where S=\mathrm{diag}(1,i) is the phase gate. Assuming that the logical gate S_{L} is available (see Section 3.2 ), a logical H gate that keeps the state in the original encoding \mathcal{E} is therefore obtained through \displaystyle H_{L}=e^{-i\pi/4}S_{L}(H_{L}H_{M})S_{L}(H_{L}H_{M})S_{L}. (15) This is because the two factors H_{M} cancel each other, and because applying the code deformation twice does nothing since \pi(H)\pi(H)|\boldsymbol{\alpha}\rangle=|\boldsymbol{\alpha}\rangle . In general, the new code induced by \mathcal{E}_{U} may not have the same error correction properties as the initial code, and could perform significantly worse, which would be bad for the overall scheme. For our specific choice of initial state of the form |\alpha,i\alpha\rangle , and for U=H , it turns out that it does, as discussed in Section 4 . 3.2 The logical S and CZ gates The most direct way to obtain the Clifford gates S and CZ is similar to the case of rotation-symmetric bosonic codes and relies on the Kerr effect. Lemma 2 . The S and CZ gates can be implemented with self-Kerr and cross-Kerr interactions: \displaystyle S_{L}=i^{\hat{n}_{2}^{2}},\qquad CZ_{L_{1}L_{2}}=(-1)^{\hat{n}_{2}\hat{n}_{4}}. (16) Proof. These properties directly follow from the fact that \pi(Z)=(-1)^{\hat{n}_{2}} applies a logical Z gate. For any integer n , it holds that i^{n^{2}}=\exp\left(i\frac{\pi}{4}(1-(-1)^{n})\right) and therefore \displaystyle i^{\hat{n}_{2}^{2}}=\exp\left(i\frac{\pi}{4}(\mathbbm{1}-Z_{L})\right)=\exp\left(i\frac{\pi}{4}(2|1\rangle\langle 1|_{L}\otimes\mathbbm{1}_{M})\right)=S_{L}. Consider two codeword basis states |\widehat{\ell_{1},m_{1}}\rangle|\widehat{\ell_{2},m_{2}}\rangle and apply the controlled-rotation unitary (-1)^{\hat{n}_{2}\hat{n}_{4}} : \displaystyle(-1)^{\hat{n}_{2}\hat{n}_{4}}|\widehat{\ell_{1},m_{1}}\rangle|\widehat{\ell_{2},m_{2}}\rangle \displaystyle=\left((-1)^{\hat{n}_{2}}\right)^{\hat{n}_{4}}|\widehat{\ell_{1},m_{1}}\rangle|\widehat{\ell_{2},m_{2}}\rangle \displaystyle=\left((-1)^{\ell_{1}}\right)^{\hat{n}_{4}}|\widehat{\ell_{1},m_{1}}\rangle|\widehat{\ell_{2},m_{2}}\rangle \displaystyle=\left((-1)^{\hat{n}_{4}}\right)^{\ell_{1}}|\widehat{\ell_{1},m_{1}}\rangle|\widehat{\ell_{2},m_{2}}\rangle \displaystyle=\left((-1)^{\ell_{2}}\right)^{\ell_{1}}|\widehat{\ell_{1},m_{1}}\rangle|\widehat{\ell_{2},m_{2}}\rangle \displaystyle=(-1)^{\ell_{1}\ell_{2}}|\widehat{\ell_{1},m_{1}}\rangle|\widehat{\ell_{2},m_{2}}\rangle which again only relies on the fact that (-1)^{\hat{n}_{2}}|\widehat{\ell,m}\rangle=(-1)^{\ell}|\widehat{\ell,m}\rangle . ∎ 3.3 Logical Z(\theta) gates through quantum Zeno effect A convenient way to perform gates of the form e^{i\theta Z} on a cat qubit is through the quantum Zeno effect [ 2 ] . The idea is to supplement the dissipation that stabilizes the code space with a slow Hamiltonian dynamics, thus leading to a quasi-unitary evolution within the code subspace. For the standard cat qubit, this is achieved with a Hamiltonian of the form \varepsilon(\hat{a}+\hat{a}^{\dagger}) . Here, we require a quadratic Hamiltonian H_{\varepsilon}=\varepsilon(\hat{a}_{1}^{2}+\hat{a}_{1}^{{\dagger}2}) , similar to the 4-legged cat qubit. For the value \alpha=\sqrt{\frac{\pi}{2}} , the four code-basis states |\widehat{\ell,m}\rangle are products of single-mode cat states that satisfy \hat{a}_{1}^{2}|\widehat{\ell,m}\rangle=(-1)^{\ell+m}\alpha^{2}|\widehat{\ell,m}\rangle=\alpha^{2}Z_{L}Z_{M}|\widehat{\ell,m}\rangle. If \Pi=\sum_{\ell,m=0}^{1}|\widehat{\ell,m}\rangle\langle\widehat{\ell,m}| denotes the projector onto the 2-qubit code space, then \Pi(\hat{a}^{2}+\hat{a}^{\dagger 2})\Pi=2\alpha^{2}Z_{L}Z_{M}\Pi and therefore \Pi\exp(iTH_{\varepsilon})\Pi effectively implements the logical gate e^{i\theta Z_{L}Z_{M}} on the code space if T=\frac{\theta}{2\alpha^{2}\varepsilon}=\frac{\theta}{\pi\varepsilon} . In particular, if the state of the multiplicity qubit is |0\rangle (and similarly if it is |1\rangle ), this corresponds to the logical gate Z_{L}(\theta):=e^{i\theta Z_{L}} . The main purpose of this gate is to transform a |+\rangle into a |+_{\theta}\rangle=\frac{1}{\sqrt{2}}(|0\rangle+e^{i\theta}|1\rangle) state. For this, it is crucial to apply it to a state of the form |\widehat{+,0}\rangle since applying it to |\widehat{0,0}\rangle or |\widehat{+,+}\rangle wouldn’t yield a useful state. This explains why the gate H_{L}H_{M} , obtained by applying the beamsplitter \pi(H) as described in Section 3.1 , was not quite sufficient for our purpose. Crucially, the state of the multiplicity register should be well-controlled for the gate to perform as expected. This suggests to mainly apply this gate to auxiliary states in order to prepare logical T -states for instance, and exploit gate teleportation to implement a logical T gate. 3.4 Alternative implementation of Z(\theta) with SNAP gates A powerful approach to implementing phase gates of the form e^{i\theta Z_{L}} relies on selective number-dependent arbitrary phase (SNAP) gates [ 28 ] , [ 29 ] . These gates are of the form \displaystyle\mathcal{S}(\vec{\theta})=\sum_{n=0}^{\infty}e^{i\theta_{n}}|n\rangle\langle n|. (17) It is straightforward to obtain logical phase and T gates by choosing the appropriate sequence of \theta_{n} on the second bosonic mode: \displaystyle S_{L}=\sum_{n=0}^{\infty}e^{i\frac{\pi}{2}n^{2}}|n\rangle\langle n|_{2},\qquad T_{L}=\sum_{n=0}^{\infty}e^{i\frac{\pi}{4}n^{4}}|n\rangle\langle n|_{2}. (18) 3.5 State preparation and measurements As already mentioned, in the special case where \boldsymbol{\alpha}=(\sqrt{\pi/2},i\sqrt{\pi/2}) , the four basis states take a simple product form as in ( 11 ). Measuring the logical qubit in the Z basis is straightforward by measuring the parity of either mode. In fact, it is also possible to measure the operator Z_{L}Y_{M} with photon number measurements. The eigenstates of Z_{L}Y_{M} can be expanded in the Fock basis: \displaystyle|\widehat{0,+i}\rangle \displaystyle\propto|1_{\alpha}\rangle|0_{i\alpha}\rangle+i|1_{i\alpha}\rangle|0_{\alpha}\rangle \displaystyle=\sum_{p,q=0}^{\infty}((-1)^{q}-(-1)^{p})f_{p,q}|2p+1\rangle|2q\rangle \displaystyle|\widehat{0,-i}\rangle \displaystyle\propto\sum_{p,q=0}^{\infty}((-1)^{q}+(-1)^{p})f_{p,q}|2p+1\rangle|2q\rangle \displaystyle|\widehat{1,+i}\rangle \displaystyle\propto\sum_{p,q=0}^{\infty}((-1)^{q}-(-1)^{p})f_{p,q}|2q\rangle|2p+1\rangle \displaystyle|\widehat{1,-i}\rangle \displaystyle\propto\sum_{p,q=0}^{\infty}((-1)^{q}+(-1)^{p})f_{p,q}|2q\rangle|2p+1\rangle for some Poisson-like coefficients f_{p,q}=\frac{\alpha^{2p+2q+1}}{\sqrt{(2p+1)!(2q)!}}e^{-\alpha^{2}} . Measuring the photon number modulo 4 for each mode distinguishes between the four states, as summarized in Table 3 . Outcomes of the Z_{L}Y_{M} measurement \hat{n}_{1}\setminus\hat{n}_{2} 0 1 2 3 0 |\widehat{1,-i}\rangle |\widehat{1,+i}\rangle 1 |\widehat{0,-i}\rangle |\widehat{0,+i}\rangle 2 |\widehat{1,+i}\rangle |\widehat{1,-i}\rangle 3 |\widehat{0,+i}\rangle |\widehat{0,-i}\rangle Table 3: Possible outcomes of a photon number measurement modulo 4, for both bosonic modes. Note that the parity (outcome modulo 2) is sufficient to recover Z_{L} . If a single photon is lost, one still correctly recovers the value of Y_{M} . 4 Stabilization and error correction The quantum Fourier encoding is valid for any initial two-mode coherent state but the choice of this state impacts the protection offered by the code. Without loss of generality, the state can be taken of the form |\alpha\rangle|\alpha e^{i\phi}\rangle for some \alpha>0 and \phi\in(0,\pi) to be optimized. Similarly to quantum spherical codes [ 18 ] and to the covariant encoding results from [ 22 ] , it makes sense to choose parameters that maximize the minimum Euclidean distance between the coherent states in the constellation. This imposes \phi=\frac{\pi}{2} . In addition, the choice \alpha=\sqrt{\frac{\pi}{2}} offers several features. First, for this value, the restriction of the encoding to \mathrm{Span}(|\widehat{0,0}\rangle=|1_{\alpha}\rangle|0_{i\alpha}\rangle,|\widehat{1,0}\rangle=|0_{i\alpha}\rangle|1_{\alpha}\rangle) satisfies the Knill-Laflamme conditions of the pure-loss channel, the dominant source of errors for bosonic codes, at the first order since the 6 states |\widehat{0,0}\rangle,\quad|\widehat{1,0}\rangle,\quad\hat{a}_{1}|\widehat{0,0}\rangle,\quad\hat{a}_{1}|\widehat{1,0}\rangle,\quad\hat{a}_{2}|\widehat{0,0}\rangle,\quad\hat{a}_{2}|\widehat{1,0}\rangle are orthogonal. 1 1 1 This holds more generally for any state |\psi\rangle_{M} of the multiplicity register with real amplitudes: |\psi\rangle=c|0\rangle+s|1\rangle . Recalling that \langle k_{i^{m}\alpha}|\ell_{i^{n}\alpha}\rangle=\delta_{k,\ell}\delta_{m,n} for k,\ell,m,n\in\{0,1\} and the choice \alpha=\sqrt{\pi/2} , it is direct to check that the states \displaystyle|\widehat{0,\psi}\rangle \displaystyle=c|1_{\alpha}\rangle|0_{i\alpha}\rangle+s|1_{i\alpha}\rangle|0_{\alpha}\rangle,\qquad|\widehat{1,\psi}\rangle=c|0_{i\alpha}\rangle|1_{\alpha}\rangle+s|0_{\alpha}\rangle|1_{i\alpha}\rangle, \displaystyle\hat{a}_{1}|\widehat{0,\psi}\rangle \displaystyle\propto c|0_{\alpha}\rangle|0_{i\alpha}\rangle+is|0_{i\alpha}\rangle|0_{\alpha}\rangle,\qquad\hat{a}_{1}|\widehat{1,\psi}\rangle\propto ic|1_{i\alpha}\rangle|1_{\alpha}\rangle+s|1_{\alpha}\rangle|1_{i\alpha}\rangle, \displaystyle\hat{a}_{2}|\widehat{0,\psi}\rangle \displaystyle\propto ic|1_{\alpha}\rangle|1_{i\alpha}\rangle+s|1_{i\alpha}\rangle|1_{\alpha}\rangle,\qquad\hat{a}_{2}|\widehat{1,\psi}\rangle\propto c|0_{i\alpha}\rangle|0_{\alpha}\rangle+is|0_{\alpha}\rangle|0_{i\alpha}\rangle are all orthogonal. This implies that the Knill-Laflamme conditions are satisfied for the approximate Kraus operators \{\mathbbm{1},\hat{a}_{1},\hat{a}_{2}\} of the loss channel in the low-loss regime. The true Kraus operators have an additional factor \sqrt{1-\gamma}^{\ \hat{n}_{1}+\hat{n}_{2}} that maps the coherent state |g\boldsymbol{\alpha}\rangle of the constellation to |\sqrt{1-\gamma}g\boldsymbol{\alpha}\rangle , but the orthogonality remains approximately satisfied for a loss parameter \gamma\ll 1 . This is similar to the 4-legged cat qubit and the pair-cat code that can also correct a single photon loss (in either mode for the pair-cat code). This optimality is confirmed by computing the performance of the Petz-recovery map of this code for the pure-loss channel: see Fig. 1 . More precisely, the idea to assess the performance of a code against the pure-loss channel is to compute its fidelity of entanglement. Starting with a maximally entangled state |\Phi\rangle_{AR}=\frac{1}{\sqrt{2}}(|00\rangle_{AR}+|11\rangle_{AR}) between a register A and a reference R , one successively encodes system A in the code via the encoding map \mathcal{E}:|\ell\rangle\mapsto|\widehat{\ell,0}\rangle , sends it through the pure-loss channel \mathcal{N} and then performs a recovery map \mathcal{R} . The entanglement fidelity is then defined as the fidelity F_{\mathrm{ent}} between the output state (\mathcal{RNE}\otimes\mathrm{id})(|\Phi\rangle\langle\Phi|) and the initial state |\Phi\rangle . Often, one considers the optimal recovery map and the corresponding fidelity can be computed by solving a semidefinite program [ 30 ] . Here, one takes instead the slightly suboptimal recovery map called the Petz map that still offers good performance [ 31 , 32 ] and is easy to compute [ 33 ] . Details can be found in Appendix B . Fig. 1 compares the performance of the 2-mode Fourier code with the other three encodings mentioned previously: the 4-legged single mode cat code, the 2-repetition cat code and the pair-cat code. All these codes, except for the 2-repetition cat code, admit a sweet spot for the value \alpha , and perform similarly for this value. By contrast, the 2-repetition cat code gets worse for larger amplitudes. This is expected since losing a single photon leads to an uncorrectable error and the probability of a single-photon loss increases with \alpha . Finally, the Gram matrix \Gamma becomes diagonal in the Fourier basis exactly for values of \alpha of the form \sqrt{\frac{p\pi}{2}} for some integer p . In that case, it means that the encoding |\ell\rangle\mapsto|\widehat{\ell,\Omega}\rangle for an arbitrary state |\Omega\rangle coincides exactly with the covariant encoding of [ 22 ] . Figure 1: Entanglement infidelity 1-F_{\mathrm{ent}} of cat-type bosonic qubit encodings for the pure-loss channel of parameter \gamma , using the Petz recovery map. Shown are the two-mode Fourier cat code (logical qubit with the multiplicity register fixed to |0\rangle_{M} ), the 4-legged cat code, the 2-repetition cat code, and the pair-cat code. Left: 1-F_{\mathrm{ent}} versus coherent amplitude \alpha at fixed \gamma=0.01 . Right: 1-F_{\mathrm{ent}} versus \gamma using \alpha=\sqrt{\pi/2} for the two-mode Fourier cat and 2-repetition cat codes, and \alpha is chosen to minimize the left-panel infidelity at \gamma=0.01 for the 4-legged cat and pair-cat codes. Pair-cat values are evaluated in a truncated two-mode Fock basis with cutoffs chosen to ensure numerical convergence. Note that the fault-tolerant implementation described in Section 3 does not visit the full 4-dimensional encoded space. Rather, the idea is to spend most of the computation with a fixed state |0\rangle_{M} in the multiplicity space, and occasionally |+\rangle_{M} when one applies the beamsplitter unitary \pi(H) to implement the gate H_{L}H_{M} on the deformed code. This explains why considering the restriction to \mathrm{Span}(|\widehat{0,0}\rangle,|\widehat{1,0}\rangle) is relevant. Note that when \pi(H) is applied, the code becomes \mathrm{Span}(|\widehat{0,+}\rangle,|\widehat{1,+}\rangle) for an initial coherent state \pi(H)|\alpha,i\alpha\rangle=|e^{i\pi/4}\alpha,e^{-i\pi/4}\alpha\rangle which is isomorphic to the initial code and therefore performs similarly against pure loss. 4.1 Dissipators and stabilizers The full 2-qubit encoding \mathrm{Span}(|\widehat{\ell,m}\rangle\>:\>\ell,m\in\{0,1\}) is a four-dimensional manifold corresponding to the odd-parity sector of the kernel of the following Lindblad operators \displaystyle L_{1}=\hat{a}_{1}^{4}-\alpha^{4},\qquad L_{2}=\hat{a}_{2}^{4}-\alpha^{4},\qquad L_{12}=\hat{a}_{1}^{2}\hat{a}_{2}^{2}+\alpha^{4}. (19) Note that L_{1} and L_{2} are redundant and that one could alternatively only consider the pair of operators L_{1},L_{12} . Moreover, one could replace L_{1} or L_{2} by the operator L_{0}=\hat{a}_{1}^{2}+\hat{a}_{2}^{2} , which has the advantage of being of degree 2 instead of 4. The odd parity projector is given by \displaystyle\Pi_{\mathrm{odd}}=\sum_{m+n=1\mod 2}|m,n\rangle\langle m,n|. (20) This projector is also relevant for the 2-repetition cat code \mathrm{Span}(|0_{\alpha}\rangle|0_{\alpha}\rangle,|1_{\alpha}\rangle|1_{\alpha}\rangle) which also imposes a parity constraint on the total number of photons in the 2 bosonic modes. The Lindblad operators L_{1} and L_{2} are identical to those of the 4-legged cat qubit, and L_{12} coincides with the Lindblad operator of the pair-cat code. Similarly to the pair code, the parity measurement can be performed without turning off the dissipator L_{12} since it commutes with e^{i\theta(\hat{n}_{1}-\hat{n}_{2})} , but this is not the case of L_{1} or L_{2} which should be turned off for this parity measurement. As explained in Section 3.1 , it is possible to implement a Hadamard gate on both qubits simultaneously by code deformation, simply by applying the beamsplitter gate \pi(H) . This sends the initial constellation of coherent states \{|g\boldsymbol{\alpha}\rangle\>:\>g\in\langle X,Z\rangle\} to \{|gH\boldsymbol{\alpha}\rangle\>:\>g\in\langle X,Z\rangle\} . One can check that this constellation lies in the kernel of the Lindblad operators \displaystyle L_{1}^{\prime}=\hat{a}_{1}^{4}+\alpha^{4},\qquad L_{2}^{\prime}=\hat{a}_{2}^{4}+\alpha^{4},\qquad\hat{a}_{1}^{2}\hat{a}_{2}^{2}-\alpha^{4}. (21) 4.2 Beyond pure loss Losses are not the only source of imperfection affecting bosonic systems, and dephasing is another prominent problem. One can get a rough idea of the resistance of a bosonic code to dephasing by computing the minimum Euclidean distance between two coherent states in the constellation, and indeed the choice of coherent state |\alpha,i\alpha\rangle is optimal in this respect among states of the form |\alpha,e^{i\phi}\alpha\rangle . This only provides some partial information, however, since the superposition is not uniform over the coherent states as in the case of spherical codes [ 34 , 18 ] . Evaluating the performance against both losses and dephasing is computationally challenging, especially for a two-mode encoding. Nevertheless, it is possible to numerically optimize single-mode bosonic codes that will perform well against a combination of loss and dephasing [ 35 ] . When the strength of both effects is of the same magnitude, it turns out that the optimal single-mode code is very close to \mathrm{Span}(|0_{i\alpha}\rangle,|1_{\alpha}\rangle) , as shown on Fig. 2 in [ 35 ] . This suggests that the two-mode encoding |\widehat{0,0}\rangle=|1_{\alpha}\rangle|0_{i\alpha}\rangle,|\widehat{1,0}\rangle=|0_{i\alpha}\rangle|1_{\alpha}\rangle should be fairly robust against the loss-dephasing channel. 5 Discussion and future work We have focused here on a specific instance of a bosonic quantum Fourier code associated with the Pauli group D_{8}=\langle X,Z\rangle . Other groups could also be relevant, such as the quaternion group Q_{8}=\langle iX,iZ\rangle , which has the property that its normalizer N(Q_{8}) is equal to the binary octahedral group 2O , i.e. the single-qubit Clifford group. One could therefore implement a gate S_{L}S_{M} with a passive Gaussian unitary instead of a self-Kerr evolution. On the other hand, the basis states do not factorize as products of single-mode cat states. It makes sense to investigate other groups, potentially also on qudits of dimension d , with encodings over d bosonic modes. The Gaussian unitary representation \pi is particularly convenient for optical setups, but may be more challenging for circuit-QED architectures. Nevertheless, beamsplitters with excellent fidelities have recently been demonstrated giving hope that the approach outlined here could become realistic in the coming years [ 36 , 37 ] . The stabilization of the code space with dissipation requires Lindblad operators of degree 4, similarly to the 4-legged cat qubit and the pair-cat codes, which could prove challenging. While we have discussed some basic properties of the error correcting code, we have not explicitly assessed how much the suggested implementation of the logical gates would be impacted by experimental imperfections. It is also crucial to understand how errors would propagate in the circuit. While not a full proof, the fact that many physical gates described in Table 2 have also been studied for the main bosonic codes out there is a source of optimism concerning their potential fault tolerance. More importantly, this table only provides a list of possible physical implementations for the logical operations, but better alternatives likely exist. Can the Fourier encoding be extended beyond bosonic codes? It is tempting to consider multiqubit codes with the tensor representation \pi(g)=g^{\otimes n} . This approach doesn’t work directly, however, because the states \pi(g)|\Phi\rangle will not be linearly independent, for any choice of initial state |\Phi\rangle , as soon as the group G contains nontrivial phases such as -1 . Spin encodings and rotors are natural candidates to explore beyond bosonic codes. Acknowledgements. I thank Aurélie Denys, Mazyar Mirrahimi, Clément Poirson and Christophe Vuillot for many useful discussions about bosonic codes, and Lev-Arcady Sellem for comments on an earlier version of the manuscript. Appendix A Single-mode cat qudit One recovers single-mode d -dimensional cat encodings by considering the abelian group G=\mathbbm{Z}/N\mathbbm{Z} for N=dM , a multiple of d , together with its representations \lambda_{k}(1)=\omega^{k} and infinite-dimensional representation \pi(1)=\omega^{\hat{n}} for \omega=e^{2\pi i/N} . The Fourier transform over G is \displaystyle F=\frac{1}{\sqrt{N}}\sum_{k,\ell=0}^{N-1}\omega^{k\ell}|\lambda_{k}\rangle\langle\ell|. (22) Fix \alpha>0 . The Gram matrix \Gamma associated with the family \pi(k)|\alpha\rangle is \Gamma_{k,\ell}=e^{\alpha^{2}(-1+\omega^{\ell-k})} and is diagonalized by the Fourier transform \Gamma=F\mathrm{diag}(\Delta_{0},\Delta_{1},\ldots,\Delta_{N-1})F^{\dagger} with \Delta_{k}=e^{-\alpha^{2}}\sum_{\ell=0}^{N-1}\omega^{k\ell}e^{\alpha^{2}\omega^{\ell}}. One obtains an orthonormal basis using |\ell\rangle:=\Gamma^{-1/2}|\omega^{\ell}\alpha\rangle : |\ell\rangle=\frac{1}{N}\sum_{k,p=0}^{N-1}\omega^{p(\ell-k)}\Delta_{p}^{-1/2}|\omega^{k}\alpha\rangle. For the two-mode cat encoding associated to the noncommutative group G=\langle X,Z\rangle , one can encode a qubit in a 2-dimensional representation of the group. Here, the group is abelian and therefore all the irreducible representations are 1-dimensional. The natural strategy is therefore to encode the basis elements in distant irreducible representations through \mathrm{Enc}(|k\rangle):=F^{\dagger}|\lambda_{kM}\rangle for 0\leq k