<figure><img src="image_1.png" /></figure>

HAL
open science

# Identifying quantum resources in encoded computations

Jack Davis, Nicolas Fabre, Ulysse Chabaud

► To cite this version:

Jack Davis, Nicolas Fabre, Ulysse Chabaud. Identifying quantum resources in encoded computations.
2025. hal-04990702

HAL Id: hal-04990702

https://hal.science/hal-04990702v1

Preprint submitted on 14 Mar 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Identifying quantum resources in encoded computations

Jack Davis¹, Nicolas Fabre², and Ulysse Chabaud¹*

¹DIENS, École Normale Supérieure, PSL University,
CNRS, INRIA, 45 rue d'Ulm, Paris 75005, France and

²Telecom Paris, Institut Polytechnique de Paris, 19 Place Marguerite Perey, 91120 Palaiseau, France

(Dated: July 29, 2024)

What is the origin of quantum computational advantage? Providing answers to this far-reaching question amounts to identifying the key properties, or *quantum resources*, that distinguish quantum computers from their classical counterparts, with direct applications to the development of quantum devices. The advent of universal quantum computers, however, relies on error-correcting codes to protect fragile logical quantum information by robustly encoding it into symmetric states of a quantum physical system. Such encodings make the task of resource identification more difficult, as what constitutes a resource from the logical and physical points of view can differ significantly. Here we introduce a general framework which allows us to correctly identify quantum resources in encoded computations, based on phase-space techniques. For a given quantum code, our construction provides a Wigner function that accounts for how the symmetries of the code space are contained within the transformations of the physical space, resulting in an object capable of describing the logical content of any physical state, both within and outside the code space. We illustrate our general construction with the Gottesman–Kitaev–Preskill encoding of qudits with odd dimension. The resulting Wigner function, which we call the *Zak–Gross Wigner function*, is shown to correctly identify quantum resources through its phase-space negativity. For instance, it is positive for encoded stabilizer states and negative for the bosonic vacuum. We further prove several properties, including that its negativity provides a measure of magic for the logical content of a state, and that its marginals are modular measurement distributions associated to conjugate Zak patches.

## I. INTRODUCTION

With the rapid development of quantum technologies, it is of major importance to identify the quantum resources which make quantum computers powerful. Beyond its fundamental significance, exploring this classical-to-quantum transition directly contributes to quantum architecture and algorithm design, with the aim of producing quantum devices capable of outperforming their classical counterparts.

In this context, phase-space representations are prominent tools for the understanding and advancement of quantum information science [1]. In addition to easing analytical computations, representing quantum states geometrically, and enabling the use of mathematical techniques from complex analysis and distribution theory, they allow for the identification and characterization of quantum resources [2]—typically in relation to the presence of negativity in a particular phase-space quasi-probability distribution representing the quantum system at hand.

The most common example of a phase-space representation is the Wigner function, first introduced in the infinite-dimensional continuous-variable (CV) setting [3] and later generalized to the finite-dimensional discrete-variable (DV) setting in multiple ways [4, 5]. A strong parallel exists between the original CV Wigner function and a specific DV Wigner function [6–9]: both emerge from a conjugacy between position and momentum vari-

ables and both are uniquely singled out by their covariance properties [10–12]. CV and DV Wigner-negative quantum states lead to statistics exhibiting quantum connectivity under CV and DV Pauli measurements, respectively [13–16]. Moreover, the theorems of Hudson [17, 18] and Gross [19] identify pure states with positive CV and DV Wigner functions in odd dimension as Gaussian and stabilizer states, respectively. Non-stabilizerness, also known as magic, is essential for universal quantum computations [20] and may in fact be directly quantified by the amount of negativity in the DV Wigner function for odd-dimensional systems [21, 22]. Gottesman–Knill-type theorems [23] further demonstrate the efficient classical simulatability of Wigner-positive circuits in both the CV and DV settings [21, 24–31]. This collection of results has led to a growing understanding that negativity of the Wigner function, or *Wigner negativity* for short, is an essential resource for both CV and DV quantum computations [22, 32, 33].

To deliver on their promise, however, quantum computations need to be protected against errors arising from unwanted interactions between the computer and its environment [34]. This may be achieved by encoding the fragile logical information in a way that is robust against errors, which typically involves some form of redundancy, or more generally some form of symmetry. Error-correction then involves regularly projecting the intermediate quantum state of the computation onto a symmetric subspace used as a code space [35, 36]. Some of the most promising quantum error-correction schemes involve bosonic codes [37], which aim to protect DV logical quantum information by encoding it into CV quantum states. The Gottesman–Kitaev–Preskill (GKP) code

<footnote>* ulysse.chabaud@inria.fr</footnote>
[38] is particularly prominent [39, 40], and relies on so-
called GKP states that have lattice-like symmetries [41].
The applications of GKP states span various fields, in-
cluding quantum metrology [42, 43], quantum communi-
cation [44], and quantum computing [45]. While difficult
to engineer, the generation of these states is quickly pro-
gressing [40, 46–50]. Given that error-correction is a nec-
essary step towards full-fledged universal quantum com-
puters, it is crucial to accurately assess quantum com-
putational resources in the context of encoded computa-
tions, and for bosonic codes in particular.

As previously mentioned, the negativity of the Wigner
function provides a fundamental tool for such a task. Re-
cently, however, an important mismatch between quan-
tum computational resources and Wigner negativity has
been uncovered in the context of GKP-encoded compu-
tation. Namely, it was shown that many CV quantum
states, such as stabilizer codewords, are resourceless from
the point of view of the physical space, i.e. being DV
Wigner-positive despite possessing arbitrarily high CV
Wigner negativity, leading to the efficient classical sim-
ulation of quantum computations involving such states
[51, 52]. Perhaps even more surprising was the further
realization that some CV Wigner-positive states (such as
the vacuum, often considered as resourceless) turn out
to be the missing ingredient to promote easy-to-simulate
quantum computations to universal ones [53–55]. This
mismatch was partially resolved by cleverly renormalising
the CV Wigner function to allow an assessment of code-
word resourcefulness using negativity [54, 56, 57], but a
complete phase-space picture accounting for states out-
side the code space is missing. The recent work [58] iden-
tifies resources for states outside the GKP code space by
studying explicit encoding maps, though at the expense
of abandoning phase-space descriptions and restricting to
ideal GKP states.

Moreover, the mismatch between quantum computa-
tional resources and Wigner negativity goes far beyond
the case of GKP codes: it is due to the fundamental dif-
ference between the physical and logical spaces, which
can be observed for virtually any encoding. Namely,
the Wigner negativity of a codeword, seen as a state in
the physical space, generally says little about the Wigner
negativity of the underlying logical state, seen as an el-
ement of the logical space (and vice-versa). This phe-
nomenon is even more striking for states outside the code
space, where quantum resourcefulness is challenging to
interpret from the logical point of view. An important
gap therefore remains when it comes to unambiguously
identifying quantum resources in encoded computations.

Here we address this gap by providing a construction
that associates to any code space a well-behaved phase-
space representation for all states in the physical space,
compatible with the logical structure of the code space.
Our framework generalises the seminal work of Brif and
Mann [59] by placing the symmetry of the code at the
heart of the framework. Emerging from this choice of
symmetry is a Wigner-like function that describes the

logical content of quantum states both within and outside
the code space.

We illustrate our construction using the odd-
dimensional GKP encoding as an example. The initial
GKP code space leads us to a continuous torus as the
phase space and to an appropriate toroidal Wigner func-
tion. We also demonstrate how error correction subrou-
tines naturally emerge and can be related to such Wigner
functions. This new quasi-probability distribution is here
named the *Zak–Gross Wigner function*, as we show it can
be understood both as (i) a joint quasi-probability dis-
tribution for modular position and momentum measure-
ments (i.e. Zak basis projections) and (ii) as a continuous
collection of DV (Gross) Wigner functions, one for each
displaced code space. Moreover we show that the neg-
ativity of the Zak–Gross Wigner function is a meaning-
ful measure of magic for all states in the physical space,
encoded or otherwise. For states in the code space it
correctly identifies stabilizer codewords as non-negative
and magic codewords as negative. For states outside the
code space, it captures the amount of resource in their
logical content. We compute the negativity for selected
examples; in particular, the vacuum state has a negative
Zak–Gross Wigner function, which resolves the appar-
ent counterintuitive fact that it provides universality to
otherwise classically simulable architectures despite hav-
ing a positive CV Wigner function [55]. This supports
the intuition that the amount of resource within a state
should not change upon encoding, and rather it is the
lens through which one is identifying the resources that
should be adapted.

The rest of the paper is structured as follows. In
section II, we provide preliminary material on phase-
space techniques, quantum information theory, and GKP
codes. In section III we explain how to construct a
Wigner function compatible with a generic encoding of a
quantum system, together with the general implications
for representing encoded computations in phase space.
In section IV we apply our construction to the case of
GKP codes and obtain the Zak–Gross Wigner function,
for which we prove important properties, provide several
interpretations, and compute selected numerical exam-
ple. We conclude in section V.

II. BACKGROUND

In this section, we provide the necessary preliminary
material. We review the Brif and Mann phase-space con-
struction in II A, CV and DV Wigner functions in sec-
tion II B, and GKP codes in section IIC.

A. Generic phase-space construction

A quantum system is naturally described by a Hilbert
space $\mathcal{H}$, which contains its pure states, and a group
$G$, which describes its dynamical symmetries. For in-
stance, the infinite-dimensional Hilbert space with the Heisenberg–Weyl group $H_3(\mathbb{C})$ describes a quantum mechanical oscillator, a bosonic mode, and a spinless particle, while a finite-dimensional Hilbert space with the group SU(2) describes a spin-$j$ particle, a collection of indistinguishable two-level atoms, and the polarization of a monochromatic light beam.

The phase-space formulation of quantum mechanics aims to represent the states of quantum systems by distributions over phase space rather than by density operators of a Hilbert space. This provides an equivalent theory for quantum mechanics based on phase-space representations which mirrors statistical theory on classical phase space, leading to profound insights about the differences between classical and quantum systems [60–62]. A generic construction of well-behaved phase-space representations for a large class of dynamical symmetry groups was derived by Brif and Mann in [59], which we revisit from an information-theoretic perspective in section III. We first provide a brief of review this construction hereafter in the case of Wigner functions and refer the reader to [59] for more details.

Let $\pi$ be an irreducible unitary representation of a connected and simply connected, finite-dimensional Lie group $G$ acting on the Hilbert space $\mathcal{H}$. Choosing a fixed reference—or fiducial—state $|\psi_0\rangle \in \mathcal{H}$, the coherent states of the system are defined as $\pi(g)|\psi_0\rangle$, for all $g \in G$ [63]. The set of coherent states up to a phase is then determined by the homogeneous space $X = G/H$, where $H \subset G$ is the subgroup of elements that leave the reference state $|\psi_0\rangle$ invariant up to a phase factor. The subgroup $H \subset G$ is the so-called isotropy subgroup of $|\psi_0\rangle$ (or equivalently the commutant of $|\psi_0\rangle\langle\psi_0|$ in $\pi(G)$) and the homogeneous space $X = G/H$ is the phase space, which comes with an invariant measure $d\mu$ and indexes the set of coherent states $|\Omega\rangle := \pi(\Omega)|\psi_0\rangle$, for all $\Omega \in X$. Intuitively, the reference state $|\psi_0\rangle$ determines the origin of phase space and its symmetries are quotiented out in order to obtain a well-behaved phase-space representation.

Denoting the natural action of $G$ on $X$ by $g \cdot \Omega$, for $g \in G$ and $\Omega \in X$, the typical desirable properties of a phase-space (generalised) Wigner function $W$ for operators $\hat{A}$ acting on the Hilbert space $\mathcal{H}$ are known as the Stratonovich–Weyl (SW) axioms:

(i) Linearity: $\hat{A} \mapsto W_{\hat{A}}$ is a linear map such that $W_{\hat{A}} = W_{\hat{B}}$ iff $\hat{A} = \hat{B}$.

(ii) Reality: $W_{\hat{A}^\dagger} = (W_{\hat{A}})^*$.

(iii) Standardization: $\int_X d\mu W_{\hat{A}} = \text{Tr}(\hat{A})$.

(iv) Covariance: $W_{\pi(g)^\dagger \hat{A} \pi(g)}(\Omega) = W_{\hat{A}}(g \cdot \Omega)$, for all $\Omega \in X$ and $g \in G$.

(v) Traciality: $\int_X d\mu W_{\hat{A}} W_{\hat{B}} = \text{Tr}(\hat{A}\hat{B})$.

When satisfied, these properties ensure that there is a one-to-one correspondence between the usual and the

phase-space formulations of quantum mechanics, and that the latter has a similar mathematical structure to that of statistical mechanics over classical phase space.

In [59], it is shown how to construct a Wigner function satisfying the SW axioms starting from the choice of a reference state which provides an (over)complete system of coherent states over $\mathcal{H}$, i.e.,

$$ \int_X d\mu(\Omega) |\Omega\rangle\langle\Omega| = \hat{\mathfrak{I}}, \qquad (1) $$

where $\hat{\mathfrak{I}}$ is the identity operator over $\mathcal{H}$. This Wigner function takes the form

$$ W_{\hat{A}}(\Omega) = \text{Tr}[\hat{\Delta}(\Omega)\hat{A}], \qquad (2) $$

where $\hat{\Delta}$ is a SW kernel operator, which possess a specific mathematical structure tailored to the SW axioms that we detail in what follows. The harmonic functions $\{Y_\nu\}_\nu$ are defined as the eigenfunctions of the Laplace–Beltrami operator and form a basis of the Hilbert space $L^2(X, \mu)$ of square-integrable functions on $X$ with invariant measure $d\mu$. Let us define the operators

$$ \hat{D}_\nu := \tau_\nu^{-1/2} \int_X d\mu(\Omega) Y_\nu(\Omega) |\Omega\rangle\langle\Omega|, \qquad (3) $$

where $\tau_\nu$ are real and positive coefficients defined implicitly by the coherent state overlaps

$$ |\langle\Omega|\Omega'||^2 = \sum_\nu \tau_\nu Y_\nu^*(\Omega) Y_\nu(\Omega'), \qquad (4) $$

for all $\Omega, \Omega' \in X$. These two equations determine the operators $\hat{D}_\nu$ up to a sign function $(-1)^{s_\nu}$, and each choice of a specific sign function leads to a SW kernel given by

$$ \hat{\Delta}(\Omega) := \sum_\nu Y_\nu(\Omega) \hat{D}_\nu^\dagger. \qquad (5) $$

This construction, which relies heavily on the representation theory of the group $G$ to identify the space $X$, its invariant measure $d\mu$, and the harmonic functions $\{Y_\nu\}_\nu$ over $L^2(X, \mu)$, provides a Wigner function based on a SW kernel which satisfies all the SW axioms, assuming that the resolution of the identity in Eq. (1) holds.

For instance, for a quantum system described by an infinite-dimensional Hilbert space $\mathcal{H}$ with dynamical symmetry group $G = H_3(\mathbb{C})$, the Heisenberg–Weyl group over $\mathbb{C}$, with the vacuum state as reference state, this construction leads to the original CV Wigner function [3], which we review in the following section.

## B. CV and DV Wigner functions

In this section, we review important properties of the original CV Wigner function [3] in parallel with one of its DV analogues, which we refer to as the Gross Wigner function [19].
Unless otherwise said, $\hbar = 1$ and $d$ refers to an odd integer. We also restrict to a single qudit/qumode, with the extension to composite systems being relatively straightforward.

The CV and DV displacement operators are

$$ 
\begin{aligned}
\hat{D}(x,p) &= e^{i\frac{\pi p}{2}} e^{ip\hat{x}} e^{-ix\hat{p}}, & x, p \in \mathbb{R}, \\
\hat{D}_d(a,b) &= \omega^{2^{-1}ab} \hat{X}^a \hat{Z}^b, & a, b \in \mathbb{Z}_d = \mathbb{Z}/d\mathbb{Z},
\end{aligned}
\quad (6) 
$$

where $\hat{X}$ and $\hat{Z}$ are the generalized Pauli operators, $\omega = e^{i\frac{2\pi}{d}}$, and $2^{-1} = \frac{d+1}{2}$ is the multiplicative inverse of 2 in $\mathbb{Z}_d$. Note that our definition for the DV displacement operator differs in convention from, for example, [64]. This is done for later convenience and to better illustrate the similarity with the CV version. With $z$ denoting $(x, p)$ or $(a, b)$ when appropriate, the displacement operators satisfy the orthogonality relations

$$ 
\begin{aligned}
\mathrm{Tr}[\hat{D}^{\dagger}(z) \hat{D}(z')] &= 2\pi\delta(z - z'), \\
\mathrm{Tr}[\hat{D}_{d}^{\dagger}(z) \hat{D}_{d}(z')] &= d\delta_{z,z'},
\end{aligned}
\quad (7) 
$$

as well as the commutation relations

$$ 
\begin{aligned}
\hat{D}(z) \hat{D}(z') &= e^{-iz^T \sigma z'} \hat{D}(z') \hat{D}(z), \\
\hat{D}_d(z) \hat{D}_d(z') &= \omega^{-z^T \sigma z'} \hat{D}_d(z') \hat{D}_d(z),
\end{aligned}
\quad (8) 
$$

where

$$ \sigma = \begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}, \quad (9) $$

which is the matrix representation of the standard symplectic form on $\mathbb{R}^2$ or $\mathbb{Z}_d^2$ respectively. Those two spaces, being in one-to-one correspondence with their respective displacement operators, are the phase spaces of the systems.

The *undisplaced parity operators* are defined by

$$ \hat{\Pi}(0,0) |x\rangle_{\hat{x}} = |-x\rangle_{\hat{x}}, \quad \hat{\Pi}_d(0,0) |j\rangle = |-j\rangle, \quad (10) $$

where $\{|x\rangle_{\hat{x}}\}_{x \in \mathbb{R}}$ are position basis states, $\{|j\rangle\}_{j=0,\dots,d-1}$ are computational basis states, and $-j \cong d-j$ is understood to be modulo $d$. An important relation [65–67] is

$$ \hat{\Pi}(0,0) = \frac{1}{4\pi} \int dz \hat{D}(z), \quad \hat{\Pi}_d(0,0) = \frac{1}{d} \sum_z \hat{D}_d(z). \quad (11) $$

The *displaced parity operators* (cf. (5)) are

$$ 
\begin{aligned}
\hat{\Pi}(z) &= \hat{D}(z) \hat{\Pi}(0,0) \hat{D}^{\dagger}(z) = \frac{1}{4\pi} \int dz' \hat{D}(z') e^{-iz^T \sigma z'}, \\
\hat{\Pi}_d(z) &= \hat{D}_d(z) \hat{\Pi}_d(0,0) \hat{D}_d^{\dagger}(z) = \frac{1}{d} \sum_{z'} \hat{D}_d(z') \omega^{-z^T \sigma z'}.
\end{aligned}
\quad (12) 
$$

These relations, obtained by applying Eq. (8) to Eq. (11), are seen as a symplectic Fourier transform mapping the displacement basis to the parity basis. This, together

with the Hilbert–Schmidt orthogonality of the displacement operators in Eq. (7), show that the two operator bases are mutually unbiased,

$$ 
\begin{aligned}
\mathrm{Tr}[\hat{D}^{\dagger}(z) \hat{\Pi}(z')] &= \frac{1}{2} e^{i\sigma(z,z')}, \\
\mathrm{Tr}[\hat{D}_{d}^{\dagger}(z) \hat{\Pi}_{d}(z')] &= \omega^{\sigma(z,z')},
\end{aligned}
\quad (13) 
$$

The expansion coefficients of a general operator, in particular a quantum state $\hat{\rho}$, in either of these bases give rise to two quasi-probability distributions. The CV and DV characteristic functions and Wigner functions are respectively

$$ 
\begin{aligned}
\chi_{\hat{\rho}}^{\mathrm{CV}}(z) &= \mathrm{Tr}[\hat{D}(z)\hat{\rho}], \quad W_{\hat{\rho}}^{\mathrm{CV}}(z) = \mathrm{Tr}[2\hat{\Pi}(z)\hat{\rho}], \\
\chi_{\hat{\rho}}^{\mathrm{DV}}(z) &= \mathrm{Tr}[\hat{D}_d(z)\hat{\rho}], \quad W_{\hat{\rho}}^{\mathrm{DV}}(z) = \mathrm{Tr}[\hat{\Pi}_d(z)\hat{\rho}],
\end{aligned}
\quad (14) 
$$

where we have dropped the subscript $d$ for the DV case. Note that the CV definition matches with [59, 61] (setting $\alpha = (x + ip)/\sqrt{2}$) and satisfies the SW axioms (i)-(v) over the phase space $\mathbb{C} \simeq \mathbb{R}^2$ with invariant measure $d^2\alpha = \frac{dxdp}{2\pi}$, while the DV definition differs from the Gross Wigner function [19] by a factor $d$, so that it satisfies the SW axioms (i)-(v) over the phase space $\mathbb{Z}_d^2$ with invariant measure $\frac{1}{d}$ times the counting measure. Substituting (12) in (14), one retrieves the original definitions of the Wigner functions. The reconstruction formulas are respectively

$$ 
\begin{aligned}
\hat{\rho} &= \frac{1}{\pi} \int W_{\hat{\rho}}^{\mathrm{CV}}(z) \hat{\Pi}(z) dz = \frac{1}{2\pi} \int \chi_{\hat{\rho}}^{\mathrm{CV}}(z) \hat{D}(z) dz, \\
\hat{\rho} &= \frac{1}{d} \sum_z W_{\hat{\rho}}^{\mathrm{DV}}(z) \hat{\Pi}_d(z) = \frac{1}{d} \sum_z \chi_{\hat{\rho}}^{\mathrm{DV}}(z) \hat{D}_d(z).
\end{aligned}
\quad (15) 
$$

### C. Encoding DV quantum information in CV: GKP codes

The GKP codes are a prominent family of qudit-to-oscillator bosonic stabilizer codes that offer protection of encoded DV quantum information against small displacements in CV phase space [38, 68–70]. We fix the qudit dimension $d$ and focus on the unbiased/square code, a stabilizer code with logical operators

$$ \hat{Z} = e^{i \sqrt{\frac{2\pi}{d}} \hat{x}} = e^{i \ell \hat{x}}, \quad \hat{X} = e^{-i \sqrt{\frac{2\pi}{d}} \hat{p}} = e^{-i \ell \hat{p}}, \quad (16) $$

and stabilizer generators

$$ \hat{Z}^d = e^{i \sqrt{2\pi d} \hat{x}} = e^{id\ell\hat{x}}, \quad \hat{X}^d = e^{-i \sqrt{2\pi d} \hat{p}} = e^{-id\ell\hat{p}}, \quad (17) $$

where $\ell = \sqrt{2\pi/d}$ is the logical step-size. The generators commute (8) and generate the abelian stabilizer group $S = \langle \hat{Z}^d, \hat{X}^d \rangle$, the associated code space of which is the simultaneous +1 eigenspace:

$$ \{|\psi\rangle \in \mathcal{H} | U |\psi\rangle = |\psi\rangle \forall U \in S\} \subset \mathcal{H}. \quad (18) $$
Each encoded computational basis state $|j\rangle \mapsto |\bar{j}\rangle$ takes the form of a Dirac comb in the position basis with period $d\ell = \sqrt{2\pi d}$,

$$|\bar{j}\rangle = \frac{1}{\sqrt{\ell}} \sum_{n \in \mathbb{Z}} |j\ell + d\ell n\rangle_{\hat{x}}. \qquad (19)$$

More generally, we extend the map $|j\rangle \mapsto |\bar{j}\rangle$ to operators by linearity and indicate by $\hat{\rho}$ the GKP-encoding of a DV density operator $\hat{\rho}$. Conversely, if $\hat{\rho}$ is a CV density operator which is the GKP-encoding of a DV state, we denote by $\hat{\rho}$ the corresponding DV logical state.

Logical operators obey the generalized Clifford/Pauli commutation relation (derivable from (8)):

$$\hat{Z}\hat{X} = \omega\hat{X}\hat{Z}, \qquad (20)$$

where $\omega = e^{2\pi i/d}$ is the first $d$th root of unity, and combine to give the encoded discrete displacement operator (6)

$$\hat{D}_d(a, b) = \omega^{2^{-1}ab} \hat{X}^a \hat{Z}^b, \qquad (21)$$

with

$$\hat{X}^a = \hat{D}_d(a, 0) \quad \text{and} \quad \hat{Z}^b = \hat{D}_d(0, b). \qquad (22)$$

In terms of the CV displacement operator (6) this is

$$\hat{D}_d(a, b) = (-1)^{ab} \hat{D}(a\ell, b\ell). \qquad (23)$$

The projector onto the code space is

$$\hat{P}_{(0,0)} = \sum_{j=0}^{d} |\bar{j}\rangle\langle\bar{j}|, \qquad (24)$$

and similarly for the displaced code spaces, which are orthogonal to each other,

$$\hat{P}_{(s,t)} = \hat{D}(s,t) \hat{P}_{(0,0)} \hat{D}^{\dagger}(s,t), \quad s,t \in [0, \ell). \qquad (25)$$

Syndrome diagnosis after an arbitrary displacement error is the determination of $(s, t)$ by simultaneously measuring the stabilizers. This can be done in a number of ways; for instance, one may perform a destructive position/momentum homodyne measurement on an auxiliary GKP state that has appropriately interacted with the logical mode [38]. Given a general CV state $\hat{\rho}$, the corresponding syndrome $(s, t)$ is measured with probability

$$\mathrm{Pr}[(s,t) | \hat{\rho}] = \mathrm{Tr}[\hat{\rho} \hat{P}_{(s,t)}], \qquad (26)$$

which we call the syndrome distribution of $\hat{\rho}$. Upon obtaining a specific syndrome an error-correcting displacement $\hat{D}(-s, -t)$ may be applied, leading, up to normalization, to the error-corrected state

$$\begin{aligned} \hat{\rho}_{(s,t)} &:= \hat{D}(-s, -t) \hat{P}_{(s,t)} \hat{\rho} \hat{P}_{(s,t)} \hat{D}^{\dagger}(-s, -t) \\ &= \hat{P}_{(0,0)} \hat{D}(s,t)^{\dagger} \hat{\rho} \hat{D}(s,t) \hat{P}_{(0,0)}. \end{aligned} \qquad (27)$$

The subset of correctable errors (i.e., those for which the above procedure does not introduce unwanted logical errors) are the displacements $\hat{D}(x, p)$ taking arguments within the phase space region $(-\ell/2, \ell/2) \times (-\ell/2, \ell/2)$ and its shifts by multiples of $d\ell$ in either direction.

GKP codes are closely related to the mathematical concepts of Zak transform and theta functions [71], for which we provide additional background in Appendix A. Note also that there exist various ways of representing geometrically GKP states: apart from the usual CV Wigner function [3, 38], the modular variables formalism [72–75] provides an approach for building an informationally-complete phase-space representation of GKP states on a double cylinder phase space [76]. However, the corresponding Wigner function does not correctly identify quantum computational resources with respect to the GKP encoding, unlike the Zak–Gross Wigner function that we introduce in this work.

### III. WIGNER FUNCTIONS FOR QUANTUM CODES

Given a quantum system described by a Hilbert space $\mathcal{H}$ and a (connected and simply connected, finite-dimensional topological Lie) symmetry group $G$ with irreducible unitary representation $\pi$ over $\mathcal{H}$, recall that the phase-space construction due to Brif and Mann [59] picks a fixed reference state $|\psi_0\rangle \in \mathcal{H}$ to be the origin of phase space and builds a system of coherent states and phase-space representations out of this choice (see section II A). The choice of reference state is arbitrary, such that the corresponding system of coherent states may be interpreted as a complete set of almost-classical states, and is usually motivated by physical considerations.

We propose to choose the reference state based on symmetry considerations instead: our construction starts with the choice of a code space $\mathcal{C}$, a specific subspace of $\mathcal{H}$ chosen to encode logical information. This choice gives rise to an associated symmetry described by the joint isotropy subgroup $H^C \subset G$ of the code space, defined as the set of elements $h$ such that

$$\pi(h) |\psi\rangle\langle\psi| \pi(h)^{\dagger} = |\psi\rangle\langle\psi|, \qquad (28)$$

for all $|\psi\rangle \in \mathcal{C}$. Note that there can be states outside of the code space with the same symmetry: those are elements of the “syndrome subspace”, which can be formally defined as the bicommutant of the code space $\mathcal{C}$, seen as a subset of $\mathcal{D}(\mathcal{H})$, with respect to the subgroup $H^C$.

Once the symmetry associated with a code space is fixed, we pick a reference state $|\psi_0\rangle \in \mathcal{C}$ within the code space whose isotropy subgroup is equal to $H^C$ and follow similar steps to the Brif and Mann construction [59]. The result is a Wigner function tailored to the choice of code space $\mathcal{C}$, over the phase space $X^C = G/H^C$. The coherent states are then given by $|\Omega\rangle := \pi(\Omega)|\psi_0\rangle$, for all $\Omega \in X^C$, and in general do not resolve the identity over
the full Hilbert space $\mathcal{H}$. The corresponding Wigner function is then not informationally-complete, because it captures the logical content of a quantum state with respect to the symmetry described by $H^C$: different quantum states related by an element $\pi(h)$ with $h \in H^C$ must have the same phase-space representation. Note that our construction generalises that of Ref. [59] to the case where the coherent states do not necessarily resolve the identity, and we retrieve their construction as a special case when they do.

For a density operator $\hat{\rho}$ on $\mathcal{H}$, its Wigner function associated with the code space $\mathcal{C}$ is given by

$$W_{\hat{\rho}}^{\mathcal{C}}(\Omega) = \mathrm{Tr}[\Delta^{\mathcal{C}}(\Omega)\hat{\rho}], \qquad (29)$$

where the kernel associated with the code space $\mathcal{C}$ is defined as

$$\hat{\Delta}^{\mathcal{C}}(\Omega) = \sum_{\nu} Y_{\nu}(\Omega) \hat{D}_{\nu}^{\dagger}, \qquad (30)$$

where $\hat{D}_{\nu}$ are the tensor operators and $Y_{\nu}$ the harmonic functions over $L^2(X^C, \mu)$, with $d\mu$ the invariant measure over $X^C$ and the index $\nu$ ranges over the spectrum of the Laplace-Beltrami operator over $L^2(X^C, \mu)$.

Explicit expressions for the tensor operators are obtained using:

$$|\langle\Omega|\Omega'\rangle|^2 = \sum_{\nu} \tau_{\nu} Y_{\nu}^*(\Omega) Y_{\nu}(\Omega') \qquad (31)$$

$$e^{i\varphi_{\nu}} \tau_{\nu}^{1/2} \hat{D}_{\nu} = \int_{X^C} d\mu(\Omega) Y_{\nu}(\Omega) |\Omega\rangle\langle\Omega|, \qquad (32)$$

where we use a generalised definition compared to [59] (see Eqs. (3) and (4)) that allows for an additional choice of phase $\varphi_{\nu}$. Inverting the first equation provides the expression of the real and positive coefficients $\tau_{\nu}$, while the second equation determines the tensor operators $\hat{D}_{\nu}$ up to a phase function. Choosing a fixed phase function then leads to an explicit expression for the kernel $\Delta^C$ and for the Wigner function $W^C$. Interestingly, we find in practice that the phase function may be chosen so that the resulting Wigner function is actually independent of the choice of reference state, and only depends on the symmetry of the code space. For instance, we may consider a bosonic mode with an infinite-dimensional Hilbert space and Heisenberg-Weyl symmetry group, and a trivial encoding corresponding to a $U(1)$ symmetry, when the “syndrome space” is the full Hilbert space. In this case, picking the vacuum state as a reference state gives back the usual CV Wigner function [59], and we show in Appendix B that picking any Fock state as a reference state (which also has $U(1)$ as isotropy subgroup) also yields the same Wigner function.

## IV. WIGNER FUNCTIONS FOR GKP CODES

In what follows, we illustrate our phase-space construction with a more interesting case for which the code space

$\mathcal{C}$ is non-trivial: we still consider a bosonic mode with an infinite-dimensional Hilbert space and Heisenberg-Weyl symmetry group, but in the more subtle case of the GKP encoding.

### A. The Zak-Gross Wigner function

For simplicity, we focus on the square qudit GKP code over a single bosonic mode, with infinite-dimensional Hilbert space $\mathcal{H}$ and symmetry group $G = H_3(\mathbb{C})$. Recall from section II C that the code space in this case is $\mathcal{C}_{\mathrm{GKP}} := \mathrm{span}\{|\vec{j}\rangle\}_{j=0,...,d-1}$, where $|\vec{j}\rangle = \frac{1}{\sqrt{\ell}} \sum_{n \in \mathbb{Z}} |j\ell + d\ell n\rangle_{\hat{x}}$, with $\ell = \sqrt{2\pi/d}$.

Any element $g \in H_3(\mathbb{C})$ can be parametrized as

$$g := g(\varphi, x, p), \quad \pi(g) = e^{i\varphi} e^{-ix\hat{p}} e^{ip\hat{x}}, \qquad (33)$$

for $\varphi, x, p \in \mathbb{R}$, i.e., as a displacement operator up to a global phase. The joint isotropy subgroup $H_{\mathrm{GKP}} \subset H_3(\mathbb{C})$ for $\mathcal{C}_{\mathrm{GKP}}$ is the group $U(1) \times \mathbb{Z} \times \mathbb{Z}$, with unitary representation

$$\pi(H^{\mathcal{C}_{\mathrm{GKP}}}) := \{e^{i\varphi} (e^{-id\ell \hat{p}})^m (e^{id\ell \hat{x}})^n | \varphi \in [0, 2\pi), m, n \in \mathbb{Z}\}, \qquad (34)$$

which up to a global phase are the stabilizers of the code. The associated phase space is $X = G/H^{\mathcal{C}_{\mathrm{GKP}}} \simeq \mathbb{T}_{d\ell}^2$, where

$$\mathbb{T}_{d\ell}^2 := [0, d\ell) \times [0, d\ell) = [0, \sqrt{2\pi d}) \times [0, \sqrt{2\pi d}) \qquad (35)$$

denotes the continuous torus with invariant measure $\frac{1}{d\ell} dudv$. The size of the torus is up to an arbitrary scaling and chosen for convenience. Using the construction outlined in the previous section, we obtain a Wigner function associated with the code space $\mathcal{C}_{\mathrm{GKP}}$ over the phase space $\mathbb{T}_{d\ell}^2$ as follows.

**Definition 1.** Let $\hat{A}$ be an operator acting on the Hilbert space $\mathcal{H}$. The Zak-Gross Wigner function associated with the code space $\mathcal{C}_{\mathrm{GKP}}$ is given by

$$W_{\hat{A}}^{\mathcal{C}_{\mathrm{GKP}}}(u, v) = \mathrm{Tr}[\hat{\Delta}^{\mathcal{C}_{\mathrm{GKP}}}(u, v) \hat{A}], \qquad (36)$$

for all $(u, v) \in \mathbb{T}_{d\ell}^2$, where the kernel associated with the code space $\mathcal{C}_{\mathrm{GKP}}$ is given by

$$\hat{\Delta}^{\mathcal{C}_{\mathrm{GKP}}}(u, v) = \hat{D}(u, v) \hat{\Delta}^{\mathcal{C}_{\mathrm{GKP}}}(0, 0) \hat{D}^{\dagger}(u, v), \qquad (37)$$

with

$$\hat{\Delta}^{\mathcal{C}_{\mathrm{GKP}}}(0, 0) = \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} (-1)^{mn} \hat{D}(n\ell, m\ell). \qquad (38)$$

We provide a detailed derivation in Appendix C, where we also show that this definition is independent of the choice of reference state with isotropy subgroup $H^{\mathcal{C}_{\mathrm{GKP}}}$, i.e., the Wigner function $W^{\mathcal{C}_{\mathrm{GKP}}}$ is defined purely by the choice of symmetry of the code space $\mathcal{C}_{\mathrm{GKP}}$. The name
Zak-Gross Wigner function comes from profound connections with Zak bases and the Gross Wigner function, which we uncover in sections IV C and IV D, respectively.

The full expression for the Zak-Gross Wigner is given by:

$$W_{\hat{A}}^{C_{\text{GKP}}}(u, v) = \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} (-1)^{mn} e^{i\ell(nv - mu)} \text{Tr}[\hat{D}(n\ell, m\ell)\hat{A}], \quad (39)$$

where the displacement operators are defined in Eq. (6). We refer to section IV E for specific examples of Zak-Gross Wigner functions.

Note that using a continuous torus as a quantum phase space has been previously considered in several works [77–79]. These constructions differ from ours, and in particular in our case dequantization is not unique in the sense that different density matrices may have the same Zak-Gross Wigner function, because this representation precisely captures the features of quantum states that are relevant with respect to a specific encoding, as we shall see in what follows.

## B. Mathematical description: the Stratonovich–Weyl axioms

Let us define the twirling map

$$\mathcal{E}(\hat{A}) := \int_{\mathbb{T}_{\ell}^2} ds dt \hat{P}_{(s,t)} \hat{\rho} \hat{P}_{(s,t)}, \quad (40)$$

where $\hat{P}_{(s,t)}$ is the projector onto a displaced code space defined in Eq. (25), and where integration is performed over the smaller torus $\mathbb{T}_{\ell}^2$. This map removes coherence between the various displaced code spaces and yields operators that are invariant under the action of $H^{C_{\text{GKP}}}$.

The next result shows that the Zak-Gross Wigner function is a well-behaved phase-space representation associated with the code space $C_{\text{GKP}}$, in the sense that it satisfies a version of the SW axioms (i)-(v) tailored to the symmetry of that space:

**Theorem 1.** The Wigner function $W^{C_{\text{GKP}}}$ satisfies:

(i') Linearity: $\hat{A} \mapsto W_{\hat{A}}^{C_{\text{GKP}}}$ is a linear map such that $W_{\hat{A}}^{C_{\text{GKP}}} = W_{\hat{B}}^{C_{\text{GKP}}} \text{ iff } \mathcal{E}(\hat{A}) = \mathcal{E}(\hat{B})$.

(ii') Reality: $W_{\hat{A}^{\dagger}}^{C_{\text{GKP}}} = (W_{\hat{A}}^{C_{\text{GKP}}})^{*}$.

(iii') Standardization: $\int_{\mathbb{T}_{\ell}^2} \frac{1}{d} dudv W_{\hat{A}}^{C_{\text{GKP}}}(u, v) = \text{Tr}[\hat{A}]$.

(iv') Covariance: $W_{\pi(g)^{\dagger} \hat{A} \pi(g)}(\Omega) = W_{\hat{A}}(g \cdot (u, v))$, for all $(u, v) \in \mathbb{T}_{\ell}^2$ and $g \in H_3(\mathbb{C})$, where the action of $H_3(\mathbb{C})$ on $\mathbb{T}_{\ell}^2$ is given by $g(\varphi, x, p) \cdot (u, v) = (u + x \mod d\ell, v + p \mod d\ell)$.

(v') Traciality: $\int_{\mathbb{T}_{\ell}^2} \frac{1}{d} dudv W_{\hat{A}}^{C_{\text{GKP}}}(u, v) W_{\hat{B}}^{C_{\text{GKP}}}(u, v) = \text{Tr}[\mathcal{E}(\hat{A})\mathcal{E}(\hat{B})] = \text{Tr}[\mathcal{E}(\hat{A})\hat{B}] = \text{Tr}[\hat{A}\mathcal{E}(\hat{B})]$.

We give a proof in Appendix D, together with additional properties of the SW kernel $\hat{A}^{C_{\text{GKP}}}$. Along the way, we prove the following relation:

$$\mathcal{E}(\hat{A}) = \int_{\mathbb{T}_{\ell}^2} \frac{1}{d} dudv W_{\hat{\rho}}^{C_{\text{GKP}}}(u, v) \hat{\Delta}(u, v). \quad (41)$$

Contrast this equation and (i') with Eq. (15) and (i): rather than being informationally-complete, the Zak-Gross Wigner function captures the part of the state that has the same symmetry as the code space $C_{\text{GKP}}$, i.e., is supported on the image of the map $\mathcal{E}$. In spite of this, note that the traciality property (v') implies that Born statistics can be retrieved from the Zak-Gross Wigner function even when only one of either a preparation (density matrix) or a measurement (POVM element) has the same symmetry as the code space.

## C. Physical description: modular measurements and conjugate Zak distributions as marginals

The two axes of the toroidal phase space $\mathbb{T}_{\ell}^2$ are associated with a modular position and a modular momentum, each with a periodicity matching the stabilizer displacement size $d\ell = \sqrt{2\pi d}$. The product of these two periods is an integer multiple of $2\pi$, implying that the stabilizers commute and can be simultaneously measured [80]. A natural question is then: where may non-classical phase-space negativity come from? By comparison, the original Wigner function is based on a phase space where the two axes are associated with the canonically conjugate variables of position and momentum, which do not commute.

As it turns out, the non-classicality is coming from logical displacements. This is natural in the GKP construction [41] and can be understood as follows. The stabilizers are indeed jointly measurable but the simultaneous eigenspaces (18) as a whole are invariant under logical shifts. This results in the syndrome distribution (26) being defined over a cell of size $\ell^2 = \frac{2\pi}{d}$, one point for each code space. So while the outcomes of the syndrome measurement take values in this small “logical cell”, that is not the same thing as simultaneously measuring the position and momentum of a bosonic state modulo $\ell = \sqrt{2\pi/d}$. Such a measurement is impossible because the product of the periods is not a multiple of $2\pi$, or equivalently because the two logical displacements do not commute [81]. Consider one of the logical displacements, $\hat{X} = e^{-i\ell\hat{p}}$ for example; all eigenstates are of the form $\psi_p(x) = e^{ipx}\varphi_p(x)$, where $\varphi_p(x)$ is $\ell$-periodic [73]. The eigenvalue for this eigenstate is $e^{-ip\ell}$, and the set of all eigenvalues is therefore parameterized by the quasi-momentum interval $p \in [0, 2\pi/\ell) = [0, \sqrt{2\pi d})$. Measuring the logical displacement $\hat{X}$ hence returns a number in this range, and similarly for $\hat{Z}$. In general, the outcome spaces of logical and stabilizer measurements are made
clear by writing:

$$ \begin{aligned} \hat{Z} &= e^{i \frac{2\pi}{d\ell} \hat{x}}, & \hat{X} &= e^{-i \frac{2\pi}{d\ell} \hat{p}}, \\ \hat{Z}^d &= e^{i \frac{2\pi}{\ell} \hat{x}}, & \hat{X}^d &= e^{-i \frac{2\pi}{\ell} \hat{p}}. \end{aligned} \quad (42) $$

While one cannot simultaneously measure both logical displacements, we see that their outcomes are localized to within the “stabilizer cell” of area $(d\ell)^2 = 2\pi d$. This larger cell of quasi-position and quasi-momentum is our phase space and the negativity arises from the non-commutativity of the logical displacements, similar to how planar negativity arises from the non-commutativity of $\hat{x}$ and $\hat{p}$.

A more concrete way to see how the negativity arises in the Zak–Gross Wigner function is by studying its marginal distributions. This is inspired by the CV notion that Wigner negativity can be thought of as an obstruction to the existence of a joint probability distribution that reproduces the quadrature distributions upon marginalization [16, 82, 83]. In the present case, a similar situation occurs, and can be explicitly seen as follows. Recall an expression for the Zak measurement (joint modular quadrature measurement) distribution of a pure CV state:

$$ |[Z_{\alpha}\psi](k, q)|^2 = \frac{1}{2\pi} \sum_{n,m} (-1)^{nm} \chi_{\psi}(\alpha n, \frac{2\pi}{\alpha}m) e^{i\alpha kn} e^{-i2\pi \frac{q}{\alpha}m}, \quad (43) $$

where $\chi_{\psi}(q, p)$ is the characteristic function of $|\psi\rangle$ (14) and $\alpha$ defines the Zak patch $[0, \alpha) \times [0, \frac{2\pi}{\alpha}) \subset \mathbb{R}^2$. This expression can be found, e.g., in [84], and we reproduce its derivation in Appendix E for completeness. Note that by setting the length $\alpha = \ell = \sqrt{2\pi}$ we get

$$ |[Z_{\ell}\psi](k, q)|^2 = \frac{1}{2\pi} \sum_{m,n} (-1)^{mn} \chi_{\psi}(\ell n, \ell m) e^{i\ell(kn-qm)}. \quad (44) $$

By Eqs. (14) and (39), this is the Zak–Gross Wigner function for the trivial ($d=1$) square GKP code with the variables $(u, v)$ respectively identified with the quasi-position $q$ and quasi-momentum $k$:

$$ |[Z_{\ell}\psi](k, q)|^2 = W_{|\psi\rangle\langle\psi|}^{C_{\text{GKP}}}(q, k). \quad (45) $$

It then follows from linearity that for general mixed states

$$ W_{\hat{\rho}}^{C_{\text{GKP}}}(u, v) = \langle v, u | \hat{\rho} | v, u \rangle, \quad (46) $$

or, equivalently,

$$ \hat{\Delta}^{C_{\text{GKP}}}(u, v) = |v, u\rangle\langle v, u|. \quad (47) $$

This, together with the fact that logical operations are the same as stabilizers for $d=1$, means that in the trivial GKP code there is no distinction between our Wigner function, the Zak distribution, and the syndrome distribution.

For $d > 1$ the situation changes and all three become distinct. Consider the following form of marginalization.

Instead of integrating out one of the variables $(u, v)$, perform a finite sum along one of the directions with a spacing of $\ell$. This has the effect of lowering the periodicity of one of the $(u, v)$ variables from $d\ell$ to $\ell$, resulting in a 2-dimensional marginal distribution over an area of $\ell \cdot d\ell = 2\pi$. Such marginals correspond to the joint probability distribution for the measurements of $\hat{Z}$ and $\hat{X}^d$, or $\hat{Z}^d$ and $\hat{X}$, respectively. Moreover, they can be identified with the Zak measurement distributions over the corresponding area, now interpreted as a Zak patch:

$$ \begin{aligned} & \frac{1}{d} \sum_{j=0}^{d-1} W_{|\psi\rangle\langle\psi|}^{C_{\text{GKP}}}(u, v - j\ell) \\ &= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} (-1)^{dnm} \chi_{\psi}(\ell dn, \ell m) e^{i\ell(dnv - mu)} \quad (48) \\ &= |[Z_{d\ell}\psi](v, u)|^2, \end{aligned} $$

where we used the identity $\sum_{j=0}^{d-1} \omega^{-jn} = d\delta_{dn,0}$ and $(-1)^{dnm} = (-1)^{nm}$ for odd $d$. Note that $v$ is now $\ell$-periodic. Similarly,

$$ \frac{1}{d} \sum_{j=0}^{d-1} W_{|\psi\rangle\langle\psi|}^{C_{\text{GKP}}}(u - j\ell, v) = |[Z_{\ell}\psi](v, u)|^2. \quad (49) $$

These two marginals can be seen on the operator level as the Zak–Gross phase point operators (37) reducing to the Zak projector basis over the respective Zak patch. Hence the presence of negativity in the Zak–Gross Wigner function can be seen as an obstruction to finding a joint probability distribution that reproduces the conjugate Zak distributions as marginals. The origins of this idea of conjugate Zak transforms acting as canonically conjugate modular variables was considered by Mann, Revzen, and Zak in [85, 86] but in the limited context of a $d$-dimensional system. Here, within the wider scope provided by the GKP framework, we have extended it to the full collection of displaced code spaces in an infinite-dimensional setting and observed an information-theoretic interpretation related to (the impossibility of) simultaneously measuring logical operators in a quantum error-correcting code.

A further property of the Zak–Gross Wigner function is that if we go further and perform a “double” marginalization of the above kind (i.e., a finite summation along both directions), the resulting object is in fact the syndrome distribution (26), i.e., the joint probability distribution for the measurements of $\hat{Z}^d$ and $\hat{X}^d$:

$$ \frac{1}{d} \sum_{a,b=0}^{d-1} W_{\hat{\rho}}^{C_{\text{GKP}}}(a\ell + s, b\ell + t) = \text{Tr}[\hat{\rho} \hat{P}_{(s,t)}], \quad (50) $$

where now $(s, t) \in \mathbb{T}_{\ell}^2$ (see Appendix F for details). See Fig. 4 for an example of Zak–Gross Wigner function illustrating these relations.
### D. Information-theoretic description: GKP encoding and the Gross Wigner function

At this point we may start reinterpreting the Zak-Gross Wigner function as representing the logical content of quantum states in $\mathcal{H}$ with respect to the GKP code space $\mathcal{C}$. First, notice that the kernel (38) rewrites (23) in terms of logical operators as:

$$ 
\begin{aligned}
\hat{\Delta}^{C_{\text{GKP}}}(0,0) &= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} (-1)^{mn} \hat{D}(n\ell, m\ell) \\
&= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} \omega^{2^{-1}mn} \hat{X}^n \hat{Z}^m \\
&= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} \hat{D}_d(n,m).
\end{aligned}
\quad (51) $$

In particular, we show that this operator can be interpreted as a logical parity operator:

**Lemma 1.**

$$ \hat{\Delta}^{C_{\text{GKP}}}(0,0) = \hat{\Pi}_d(0,0), \quad (52) $$

where $\hat{\Pi}_d(0,0) := \sum_{j=0}^{d-1} |-\bar{j}\rangle\langle\bar{j}|$ is the GKP-encoded parity operator over $\mathcal{H}$.

We give a proof in Appendix D by computing the action of both operators on the position basis.

Recall from Eq. (14) the expression of the DV Wigner function in terms of DV displaced parity operators as $W_{\hat{\rho}}^{\text{DV}}(a,b) = \text{Tr}[\hat{\Pi}_d(a,b)\hat{\rho}]$, for all $(a,b) \in \mathbb{Z}_d^2$. From Definition 1, this suggests that the Zak-Gross Wigner function is related to the Gross Wigner function of GKP-encoded states. The next result makes this connection precise:

**Theorem 2.** Let $\hat{\rho}$ be a continuous-variable state and $(u,v) \in \mathbb{T}_{\ell d}^2$. Writing $u = s + a\ell$ and $v = t + b\ell$ for $(s,t) \in \mathbb{T}_{\ell d}^2$ and $(a,b) \in \mathbb{Z}_d^2$, we have

$$ W_{\hat{\rho}}^{C_{\text{GKP}}}(u,v) = W_{\hat{\rho}(s,t)}^{\text{DV}}(a,b), \quad (53) $$

where $\hat{\rho}(s,t)$ is the finite-dimensional (sub-normalised) logical state corresponding to the error-corrected state $\hat{\rho}(s,t) = \hat{P}_{(0,0)}\hat{D}(s,t)^{\dagger}\hat{\rho}\hat{D}(s,t)\hat{P}_{(0,0)}$ defined in Eq. (27).

The proof of this result is based on Lemma 1 and is detailed in Appendix D. The result is more generally valid for any CV operator $\hat{A}$ such that $W_{\hat{\rho}}^{C_{\text{GKP}}}$ is well-defined.

A first consequence of Theorem 2 is that the Zak-Gross Wigner function of a codeword $\hat{\rho}$ numerically matches the Gross Wigner function of the unencoded finite-dimensional state $\hat{\rho}$,

$$ W_{\hat{\rho}}^{C_{\text{GKP}}}(u,v) = \begin{cases} W_{\hat{\rho}}^{\text{DV}}(a,b), & (u,v) = (a\ell, b\ell) \\ 0, & \text{otherwise.} \end{cases} \quad (54) $$

This relationship can be summarized by the following schematic commutative diagram for a $d$-dimensional quantum state $\hat{\rho}$:

$$ 
\begin{array}{ccc}
\mathcal{D}(\mathcal{H}_d) \ni \hat{\rho} & \xrightarrow{\text{encode}} & \hat{\rho} \\
\downarrow_{\text{DV Wigner}} & & \downarrow_{\text{Zak-Gross Wigner}} \\
W_{\hat{\rho}}^{\text{DV}}(a,b) & \xrightarrow{\text{embed in } \mathbb{T}_{d\ell}^2} & W_{\hat{\rho}}^{C_{\text{GKP}}}(a\ell, b\ell)
\end{array}
\quad (55) $$

for $(a,b) \in \mathbb{Z}_d^2$, where $\mathcal{D}(\mathcal{H}_d)$ denotes the set of density operators over a $d$-dimensional Hilbert space $\mathcal{H}_d$.

Related ideas have been discussed recently in [57, 87]. These works use the GKP framework to faithfully relate DV measures of non-classicality such as DV Wigner negativity and stabilizer Rényi entropy to the non-classicality properties of CV (i.e., planar) quasiprobability distributions representing the encoded counterparts. These results also offer insight to the more general problem of understanding how a quantum resource should be characterized pre-encoding vs post-encoding.

However, such connections to CV distributions so far only apply to states within the GKP code space $\mathcal{C}_{\text{GKP}}$. By contrast, our construction assigns a well-behaved phase-space representation to all states in $\mathcal{H}$, both within and outside $\mathcal{C}_{\text{GKP}}$. Indeed, Theorem 2 implies more generally that the Zak-Gross Wigner function can in fact be interpreted as a continuous family of DV Wigner functions, one for each displaced GKP code space. In particular, we obtain the inverse diagram of (55), valid for a general CV state $\hat{\rho}$ and for general displacements:

$$ 
\begin{array}{ccc}
\mathcal{D}(\mathcal{H}) \ni \hat{\rho} & \xrightarrow{\text{error-correct}} & \hat{\rho}(s,t) \\
\downarrow_{\text{Zak-Gross Wigner}} & & \downarrow_{\text{DV Wigner}} \\
W_{\hat{\rho}}^{C_{\text{GKP}}}(a\ell + s, b\ell + t) & \xrightarrow{\text{restrict}} & W_{\hat{\rho}(s,t)}^{\text{DV}}(a,b)
\end{array}
\quad (56) $$

for $(a,b) \in \mathbb{Z}_d^2$ and $(s,t) \in \mathbb{T}_{\ell d}^2$, where $\mathcal{D}(\mathcal{H})$ denotes the set of density operators over the infinite-dimensional Hilbert space $\mathcal{H}$.

Equivalently, the restriction of the Zak-Gross Wigner function to a displaced logical lattice within the toroidal phase space, $\ell\mathbb{Z}_d \times \ell\mathbb{Z}_d \hookrightarrow \mathbb{T}_{\ell d}^2$, yields the DV Wigner function of the CV state projected to that code space. In this respect, the Zak-Gross Wigner function is a truly hybrid CV-DV phase space representation: it has finite support for states within a finite number of displaced code spaces, but continuous support in general. It is now also clear that the conjugate Zak distributions, (48) and (49), can be seen as collective quadrature-like marginals of a family of DV Wigner functions.

To interpret the double marginal (50), it should be emphasized from Theorem 2 that the DV state that such a restricted Zak-Gross Wigner function represents is sub-normalized. This comes from the fact that general CV states have support on more than one code space and therefore will collapse onto them with different probabilities, given by the syndrome distribution (26), leading to a sub-normalization by a factor equal to this probability. For ideal codewords affected by displacement errors,
this does not arise because they are always contained entirely within only one displaced code space. Hence, the collection of DV Wigner functions comprising the Zak–Gross Wigner function are each normalized to the probability of obtaining their associated displaced code space in the syndrome measurement. The double marginal is now readily seen as calculating this probability. We refer to Fig. 4 for an explicit example.

It remains to give an operational interpretation of the negativity of the Zak–Gross Wigner function. The negative volume of the DV Wigner function of a qudit state $\hat{\rho}$ is defined as

$$ \mathcal{N}_{\hat{\rho}}^{\text{DV}} = \frac{1}{d} \sum_{a,b \in \mathbb{Z}_d} |W_{\hat{\rho}}^{\text{DV}}(a,b)|. \quad (57) $$

Since the DV Wigner function is normalised, the negative volume is 1 for density operators with non-negative DV Wigner function and greater than 1 otherwise. In the odd-dimensional case, it provides a measure of magic [22]. We define similarly the negative volume of the Zak–Gross Wigner function of a CV state $\hat{\rho}$ as

$$ \mathcal{N}_{\hat{\rho}}^{C_{\text{GKP}}} := \int_{\mathbb{T}_{\ell}^2} \frac{1}{d} du dv \left| W_{\hat{\rho}}^{C_{\text{GKP}}}(u, v) \right|. \quad (58) $$

As before, since the Zak–Gross Wigner function is normalised, the negative volume is 1 for density operators with non-negative Zak–Gross Wigner function and greater than 1 otherwise. Recall from section II C that GKP error correction of a state $\hat{\rho}$ measures a syndrome $(s, t) \in \mathbb{T}_{\ell}^2$ with probability $\text{Pr}[(s, t) | \hat{\rho}] = \text{Tr}[\hat{\rho} \hat{P}_{(s,t)}]$, leading to the normalised post-measurement state $\hat{\rho}'(s, t) := \hat{\rho}(s, t) / \text{Tr}[\hat{\rho} \hat{P}_{(s,t)}]$ in the code space $C_{\text{GKP}}$, with its corresponding DV logical state $\hat{\rho}'(s, t)$ through the GKP encoding. The next result, which is a direct consequence of Theorem 2 and of the linearity of the DV Wigner function, shows that the negative volume of the Zak–Gross Wigner function provides a GKP-compatible measure of magic for states both within and outside the code space.

**Corollary 1.** The negative volume of the Zak–Gross Wigner function is the average negative volume of the Gross Wigner function over one round of GKP error correction:

$$ \mathcal{N}_{\hat{\rho}}^{C_{\text{GKP}}} = \int_{\mathbb{T}_{\ell}} ds dt \text{Pr}[(s,t) | \hat{\rho}] \mathcal{N}_{\hat{\rho}'(s,t)}^{\text{DV}}, \quad (59) $$

for any CV state $\hat{\rho}$, where $\text{Pr}[(s,t) | \hat{\rho}]$ is the syndrome distribution.

This result implies that stabilizer codewords are positively represented by the Zak–Gross Wigner function, while magic codewords are negatively represented. Moreover, for states outside the code space, the negative volume of the Zak–Gross Wigner function is the average negative volume of the DV Wigner functions of the

codewords obtained after error correction. Note that the negative volume of the Zak–Gross Wigner function of a CV state $\hat{\rho}$ is in general greater than the negative volume of the DV Wigner function of the logical state associated to the expected error-corrected state $\int_{\mathbb{T}_{\ell}^2} ds dt \hat{P}_{(0,0)} \hat{D}^{\dagger}(s,t) \hat{\rho} \hat{D}(s,t) \hat{P}_{(0,0)}$, by the triangle inequality. Note also that there exist bosonic states whose projection to the GKP code space is DV-Wigner-positive yet is Zak–Gross Wigner-negative: an example is a thermal state of appropriate temperature (see section IV E), or any encoded magic state displaced by a non-logical displacement.

## E. Examples

In this section, we present explicit examples of Zak–Gross Wigner functions.

### 1. Codewords

From Sec. IV D, the Zak–Gross Wigner function of a GKP-encoded computational basis state $|\vec{j}\rangle$ is essentially the DV Wigner function of the unencoded state $|j\rangle$ embedded into the continuous torus $\mathbb{T}_{\ell}^2$. In particular, it is a vertical sequence of $d$ delta functions starting at $v = 0$ and vertically interspaced by an amount $\ell$, with fixed horizontal position $u = j\ell$. The encoded Fourier states $|\vec{j}\rangle_+$ similarly form a horizontal sequence of delta functions with vertical position $v = j\ell$.

### 2. Coherent states

First consider the vacuum state $|0\rangle$. With Eq. (39), its Zak–Gross Wigner function is found to be

$$ W_{|0\rangle}^{C_{\text{GKP}}}(u, v) = \frac{1}{2\pi} \sum_{n,m \in \mathbb{Z}} (-1)^{nm} e^{i\ell(nv - mu)} e^{-\frac{\pi}{2d}(n^2 + m^2)}. \quad (60) $$

Following the definition (36), this can be found for example by computing the characteristic function $\chi_{|0\rangle}(x, p)$ then performing the weighted sum over the logical lattice. Another approach is to proceed entirely in position basis and use the wavefunction representation $\psi_0(x) = \pi^{-1/4}e^{-x^2/2}$; see Appendix G for details on thermal states from which the vacuum can be obtained as a special case. Regardless of the derivation, the result can be expressed as a particular two-dimensional theta function (A8) $\theta(z, \tau)$ restricted to real inputs in the first factor:

$$ W_{|0\rangle}^{C_{\text{GKP}}}(u, v) = \frac{1}{2\pi} \theta\left(\left(\frac{v}{d\ell}, -\frac{u}{d\ell}\right), \tau\right), \quad \tau = \frac{1}{2} \begin{pmatrix} \frac{i}{d} & 1 \\ 1 & \frac{i}{d} \end{pmatrix}. \quad (61) $$

The remaining coherent states follow from the covariance property under continuous displacements (iv'). In partic-
<figure><img src="image_3.png" /><figcaption>FIG. 1. The Zak–Gross Wigner function of the vacuum $|0\rangle$ with logical dimension $d = 13$.</figcaption></figure>

ular the coherent state $|x, p\rangle = \hat{D}(x, p)|0\rangle$ is

$$ W_{|x,p\rangle}^{C_{GKP}}(u,v) = W_{|0\rangle}^{C_{GKP}}(u-x, v-p) \\ = \frac{1}{2\pi}\theta\left(\left(\frac{v-p}{d\ell}, -\frac{u-x}{d\ell}\right), \tau\right), \quad (62) $$

that is represented in Fig. 1. Unlike the original Wigner function, the Zak–Gross Wigner function takes negative values for the vacuum state. In particular, the negativity is concentrated about the point $(u, v) = (\frac{d\ell}{2}, \frac{d\ell}{2})$.

### 3. Thermal states

Associated with the harmonic oscillator Hamiltonian $\hat{H} = \frac{1}{2}(\hat{x}^2 + \hat{p}^2)$ are the thermal states $\hat{\rho}_\beta = e^{-\beta\hat{H}}/Z(\beta)$, where $\beta = 1/T$ is the inverse temperature and

$$ Z(\beta) = \mathrm{Tr}[e^{-\beta \hat{H}}] = \frac{1}{2 \sinh(\frac{\beta}{2})} \quad (63) $$

is the partition function [88]. The Zak–Gross Wigner function of such states is found to be

$$ W_{\hat{\rho}_{\beta}}^{C_{GKP}}(u, v) = \frac{1}{2\pi} \sum_{n,m \in \mathbb{Z}} (-1)^{nm} e^{i\ell(nv - mu)} e^{-\frac{\pi}{d}(n^2 + m^2)\langle \hat{H} \rangle_{\beta}}, \quad (64) $$

where

$$ \langle \hat{H} \rangle_{\beta} = \frac{1}{2} \coth\left(\frac{\beta}{2}\right) \quad (65) $$

is the energy; see Appendix G for details. The vacuum (60) is recovered in the limit $\beta \to 0$ where $\langle \hat{H} \rangle_\beta \to \frac{1}{2}$. As for coherent states, the thermal Zak–Gross Wigner function (64) can be expressed as a two-dimensional theta

<figure><img src="image_4.png" /><figcaption>FIG. 2. Zak–Gross Wigner function for $d = 13$ of a thermal state at temperature $T = 1$, displaced by an amount $\hat{D}(\frac{d\ell}{4}, \frac{d\ell}{4})$. The colour scale is normalized to the vacuum Zak–Gross Wigner function to display the overall flattening as temperature increases.</figcaption></figure>

function (A8) restricted to real inputs in the first factor:

$$ W_{\hat{\rho}_{\beta}}^{C_{GKP}}(u, v) = \frac{1}{2\pi} \theta\left(\left(\frac{v}{d\ell}, -\frac{u}{d\ell}\right), \tau\right), \quad \tau = \begin{pmatrix} i \frac{\langle \hat{H} \rangle_{\beta}}{d} & \frac{1}{2} \\ \frac{1}{2} & i \frac{\langle \hat{H} \rangle_{\beta}}{d} \end{pmatrix}. \quad (66) $$

The covariance of the Zak–Gross Wigner function (iv') allows us to consider displaced thermal states by a relation similar to the coherent states (62). From (66), we see that for finite logical dimension $d$ the presence of zero-point energy (i.e., $\langle \hat{H} \rangle_\infty \neq 0$) precludes $\tau$ from leaving the Siegel upper half-space.

See Fig. 2 for an example; this is the thermal state at temperature $T = 1$ for logical dimension $d = 13$ and displaced by an amount $\hat{D}(\frac{d\ell}{4}, \frac{d\ell}{4})$. Comparing to the vacuum in Fig. 1, this additional displacement is done to better showcase how the relative size of the positive and negative regions increase with temperature. We note in passing that this pattern is surprisingly similar to the CV Wigner function for stabilizer qubit states restricted to an appropriate cell.

To characterize and interpret the presence of negativity we focus without loss of generality on undisplaced thermal states. In every case considered the negativity concentrates about the centre of phase space $(u, v) = (\frac{d\ell}{2}, \frac{d\ell}{2})$ and nowhere else; Fig. 1 is typical up to a broadening of the characteristic regions. This is accompanied by peaks of positivity at $(u, v) \in \{(0, 0), (0, \frac{d\ell}{2}), (\frac{d\ell}{2}, 0)\}$. We conjecture this observation, which is based only on the structure of theta functions, to be universal for all integers $d$, even and odd. With that said, assuming $W_{\hat{\rho}_\beta}(\frac{d\ell}{2}, \frac{d\ell}{2})$ is a global minimum for all finite $d$ and finite temperature $T = 1/\beta$, it follows that the negativity of the thermal Zak–Gross Wigner function (and therefore the presence of magic) is entirely governed by this value. In particular, numerical evidence suggests that the following inequality must be satisfied for there to be positivity in the thermal
Zak–Gross Wigner function:

$$ \langle \hat{H} \rangle_{\beta} > \frac{d}{2}. \qquad (67) $$

That is, the violation of (67) represents the presence of negativity. Factoring out vacuum fluctuations, this puts a constraint on the number of thermal photons $\bar{n} = \langle \hat{N} \rangle = \langle \hat{H} \rangle_{\beta} - 1/2$ in the oscillator:

$$ \bar{n} > \frac{d-1}{2}. \qquad (68) $$

When $d=1$ this is satisfied by any CV state, in agreement with (45) showing that the Zak–Gross Wigner function reduces to a non-negative Zak distribution. Eqs. (67) and (68) can also be equivalently phrased using properties of the covariance matrix

$$ V = \begin{pmatrix} \langle \hat{x} \rangle^2 & \frac{1}{2} \langle \{ \hat{x}, \hat{p} \} \rangle \\ \frac{1}{2} \langle \{ \hat{x}, \hat{p} \} \rangle & \langle \hat{p} \rangle^2 \end{pmatrix} \approx \begin{pmatrix} \nu & 0 \\ 0 & \nu \end{pmatrix}, \qquad (69) $$

where the second matrix is the Williamson normal form of $V$ and $\nu$ is the corresponding symplectic eigenvalue [89, 90]. For thermal states this is just $\nu = \bar{n} + \frac{1}{2}$, leading to the same constraint,

$$ \nu > \frac{d}{2}. \qquad (70) $$

Now when $d=1$ this is identified with the Heisenberg uncertainty relation for single-mode Gaussian states [89], which of course is satisfied by all quantum states. But for $d > 1$ we have a hierarchy of uncertainty inequalities,

$$ \nu = \sqrt{\det[V]} > \frac{2\pi d}{4\pi}, \qquad (71) $$

the violation of which comes with an appealing geometric interpretation: a thermal state is Zak–Gross Wigner-negative when the phase space extent of the CV Wigner function, as measured by $\sqrt{\det[V]} = \nu$, is appropriately contained within the stabilizer cell.

An immediate consequence is that the same thermal state can be Zak–Gross Wigner-negative for a high logical dimension but positive for a low logical dimension; see Figure 3. It also means that for a given logical dimension $d$ there is a critical temperature $T_d$ beyond which the associated thermal state is Wigner-positive in both the Zak–Gross sense and the usual sense. More generally, it is likely the case that any CV state will become Wigner-positive in both senses after a sufficient degree of Gaussian blurring has been applied, e.g., by the pure loss channel.

We end this subsection on thermal states with a technical observation. After rescaling the $z$ argument appearing in the theta functions by the stabilizer length $d\ell$, the minimum value in the Wigner function (which serves as a magic witness for the error-corrected thermal state) can be written using a theta function with characteristics (see Appendix A) evaluated at the origin,

$$ \min W_{\hat{\rho}_{\beta}, \text{rescaled}} \sim \theta \left[ \begin{pmatrix} 0 \\ \left(\frac{1}{2}, \frac{1}{2}\right) \end{pmatrix} \right] ((0,0), \boldsymbol{\tau}). $$

<figure><img src="image_5.png" /><figcaption>FIG. 3. Minimum of the Zak–Gross Wigner function of a thermal state as a function of temperature, with $T=0$ being the vacuum. Logical dimension 1 is always non-negative due to the Zak–Gross Wigner function reducing to the Zak measurement distribution. Logical dimension 2 is included for interest, though there is no underlying DV Gross Wigner function.</figcaption></figure>

This particular shift of $1/2$ is commonly seen in the study of theta functions. Furthermore, the right hand side of the above relation, seen as a function of $\boldsymbol{\tau}$, is precisely what is known as a *theta constant*, which is a central object in the study of modular forms [91]. The connection to quantum magic perhaps suggests that a deeper mathematical theory could bring about new tools for studying GKP resources.

### 4. Physical GKP states

Ideal GKP states are non-normalizable and so cannot be experimentally produced. Instaed, it is crucial to consider approximate GKP codewords [38, 92–94], which can be seen in the position basis as a sum of squeezed Gaussians together with an overall damping Gaussian envelope. For the computational state $|j\rangle$ this is

$$ |j\rangle \sim \sum_{k \in \mathbb{Z}} e^{-\frac{1}{2} \kappa^2 (j\ell + d\ell k)^2} \int dx e^{-\frac{1}{2} \frac{(x-j\ell-d\ell k)^2}{\sigma^2}} |x\rangle_{\hat{x}}, \qquad (72) $$

up to some finite normalization constant. Here $\sigma$ is the standard deviation of the individual Gaussians while $\frac{1}{\kappa}$ is the standard deviation of the envelope. With $c_k \equiv e^{-\frac{1}{2} \kappa^2 (j\ell+d\ell k)^2}$ denoting the weights, we find that up to normalization the Zak–Gross Wigner function can be expressed as a weighted summation of two-dimensional theta functions:

$$ W_{|j\rangle}^{C_{\text{GKP}}}(u, v) \sim \sum_{k, k'} c_k c_{k'} e^{-\frac{\pi d}{2\sigma^2} (k' - k)^2} \theta(z(u, v, k, k'), \boldsymbol{\tau}) \qquad (73) $$
<figure><img src="image_6.png" /><figcaption>FIG. 4. The Zak-Gross Wigner function of a slightly displaced approximate GKP codeword for the $d = 3$ computational state $|0\rangle$. The vertical and horizontal marginals are modular/Zak measurement distributions corresponding to conjugate Zak patches. The lower right plot is the syndrome distribution, obtained by a further marginalization of either Zak distribution. Each plot and colour scale is self-normalized.</figcaption></figure>

where

$$ 
\begin{aligned}
z_1 &= \frac{v}{d\ell} + i \frac{k' - k}{2\sigma^2}, \\
z_2 &= -\frac{u}{d\ell} + \frac{1}{2}(k + k' + \frac{2}{d}j),
\end{aligned} 
\qquad \tau = \frac{1}{2} \begin{pmatrix} \frac{i}{d}\frac{1}{\sigma^2} & 1 \\ 1 & \frac{i}{d}\sigma^2 \end{pmatrix}. 
\qquad (74) 
$$

See Appendix H for a derivation.

We give an example in Fig. 4 for $d = 3$, $j = 0$, $\sigma = 0.51$ and $\kappa = 0.4$. It was computed using a truncated summation of Eq. (72) to three Gaussians; zith negligible effect on the position wavefunction given the strength of $\kappa$. It has also been slightly displaced to better display its structure. In particular, the Zak-Gross Wigner function takes on negative values on the toroidal phase space. Numerics suggest that as the state becomes more ideal through varying $\sigma$ and $\kappa$, the faint peaks along $u \approx 2\ell$ (two negative and one positive) decrease in magnitude while the three positive bright peaks along $u \approx \frac{\ell}{2}$ approach the three point-peaks expected in the ideal case. Figure 4 also demonstrates the general relationships between the Zak-Gross Wigner function and its non-negative marginals: the two conjugate Zak distributions and the syndrome distribution.

## V. SUMMARY AND OUTLOOK

We have introduced a symmetry-based construction of Wigner functions, generalizing the work of [59]. This generalization can be thought of as considering reference spaces rather than reference states when constructing the

phase-space representation. This approach is particularly well-suited in the context of quantum error-correcting codes. The resulting Wigner function is generally not informationally complete, but it satisfies a modified version of the Stratonovich-Weyl axioms tailored to the reference subspace.

We have applied our construction to the GKP encoding and focused on the case of odd logical dimensions where Wigner negativity in the logical space has previously been identified as a measure of magic [22]. The resulting Wigner function, which we named the Zak-Gross Wigner function, has several attractive properties as a phase-space representation of bosonic states over the continuous torus. In particular, its restriction to an embedded $d \times d$ grid with spacing $\sqrt{2\pi/d}$ (i.e., a displaced logical lattice) yields the Gross Wigner function of the CV state projected to the GKP code space corresponding to the given grid. This allows for an interpretation of the Zak-Gross Wigner function as a continuous family of individual Gross Wigner functions, one for each displaced code space. Their collective DV marginals yield modular quadrature measurement distributions associated to conjugate Zak patches, while their collective double marginal yields the syndrome distribution, reflecting the property that each individual Gross Wigner function is normalized to the probability of the CV state collapsing to the corresponding code space. Finally, we showed that the negativity volume of the Zak-Gross Wigner function provides a measure of magic of the logical content of a CV state, as it can be interpreted as the expected DV negativity over a single round of GKP error correction.

We computed the Zak-Gross Wigner function for several CV states. As expected, for stabilizer codewords it corresponds to their positive Gross Wigner function embedded within the continuous torus. Coherent states, on the other hand, and in particular the vacuum, are Zak-Gross Wigner-negative. Thermal states show a structure similar to coherent states but with negativity decreasing with temperature until finally they become Wigner positive. This critical temperature is a function of the logical dimension, illustrating the general property that the same CV state may be more or less resourceful depending on the logical dimension of the encoding. Finally we have studied approximate GKP states and found that they are slightly Zak-Gross Wigner-negative.

Our results shed light on the perhaps counterintuitive results about classical simulability of GKP-encoded circuits [51–55]. More generally, our framework contributes to the ongoing discussion of how to characterize the logical content of a state that has support on more that just the code space of a given quantum code [58]. By employing phase-space techniques in particular, our work offers a novel perspective on the question of sufficiency of Wigner negativity as a witness for quantum resourcefulness in the context of quantum computation. That is, a fruitful way forward may be to account for the code space symmetry as it sits within the physical space.

Our work opens several directions for future research.
One is to apply our general phase-space construction to other quantum codes as a means to characterize quantum resources under different encodings. This includes in particular finite-dimensional stabilizer codes, such as the surface code, as well as codes with a non-trivial symmetry group on the physical space [95]. Other codes of interest include alternative bosonic codes such as binomial and cat codes [68]. We anticipate that our framework is also compatible with code concatenation, by interpreting the physical space as comprising all higher levels.

A second direction is to further harness our novel Zak-Gross Wigner function in the GKP setting. This includes deriving a Gottesman-Knill-type theorem based on the toroidal phase-space techniques developed here. Our construction has encoded Clifford operations already built-in, so the natural next step is to consider covariance under general Gaussian unitaries. Given the results of [55], we expect a strong distinction between the handling of rational vs irrational symplectic transformations. We emphasize that our construction in principle works for even-dimensional encodings as well. We chose the odd-dimensional GKP code because of the known connections to magic in the DV setting. However another research path would be to instead focus on logical qubits and investigate if and how the result may be a continuous family of $d = 2$ Wootters Wigner functions [8], one for each code space. Another topic to consider is the extent to which the uncertainty relations numerically obtained in the context of unsqueezed Gaussians (70) can be applied more generally and rigorously proven. This may lead to Zak-Gross negativity witnesses and bounds on magic state distillation protocols in the GKP code. Finally, from a more foundational perspective, there has been a growing interest in using modular variables as quantum tests of reality, in particular those related to violating Leggett-Garg and contextuality inequalities [96-98].

Given the connection between the Zak-Gross Wigner function to both the Gross Wigner function and conjugate Zak measurements, a reasonable belief is that negativity therein could be related to such modular-based tests. In particular, is Zak-Gross Wigner negativity related to contextuality for modular quadrature measurements?

Finally, a third direction is to further advance the underlying phase-space framework. In particular, the methods of [59] require a choice of reference state (generalized here to reference space) to build the phase-space representation, together with an ansatz for the phase-space representation. That such a choice of reference state turns out to have little consequence in the case of Wigner functions suggests that the employed framework is more involved than necessary. Alternative approaches to phase-space quantization such as [99] may also be worth exploring.

## ACKNOWLEDGMENTS

We acknowledge inspiring discussions with R. I. Booth, F. Arzani, P.-E. Emeriau, G. Ferrini, A. Ferraro, C. Calcluth, J. Bermejo-Vega, O. Hahn and R. Takagi. U.C. acknowledges funding from the European Union's Horizon Europe Framework Programme (EIC Pathfinder Challenge project Veriqub) under Grant Agreement No. 101114899. J.D. acknowledges funding from the Plan France 2030 project NISQ2LSQ (ANR-22-PETQ-0006).

[1] R. P. Rundle and M. J. Everitt, Advanced Quantum Technologies, 2100016 (2021).

[2] E. Chitambar and G. Gour, Rev. Mod. Phys. 91, 025001 (2019).

[3] E. Wigner, Phys. Rev. 40, 749 (1932).

[4] G. Björk, A. B. Klimov, and L. L. Sánchez-Soto, The discrete Wigner function, in Progress in Optics, Vol. 51 (Elsevier, 2008) p. 469-516.

[5] R. P. Rundle and M. J. Everitt, Adv. Quantum Technol. 4, 2100016 (2021).

[6] J. Schwinger, Proc. Natl. Acad. Sci. U.S.A. 46, 570 (1960).

[7] F. A. Buot, Phys. Rev. B 10, 3700 (1974).

[8] W. K. Wootters, Ann. Phys. (N. Y.) 176, 1 (1987).

[9] D. Galetti and A. de Toledo Piza, Phys. A: Stat. Mech. Appl. 149, 267 (1988).

[10] H. Zhu, Phys. Rev. Lett. 116, 040501 (2016).

[11] N. C. Dias and J. N. Prata, Rev. Mat. Iberoam. 35, 317-337 (2019).

[12] D. Schmid, H. Du, J. H. Selby, and M. F. Pusey, Phys. Rev. Lett. 129, 120403 (2022).

[13] M. Howard, J. Wallman, V. Veitch, and J. Emerson, Nature 510, 351 (2014).

[14] N. Delfosse, C. Okay, J. Bermejo-Vega, D. E. Browne, and R. Raussendorf, New J. Phys. 19, 123024 (2017).

[15] J. Haferkamp and J. Bermejo-Vega, arXiv:2112.14788 [quant-ph]. (2021),

[16] R. I. Booth, U. Chabaud, and P.-E. Emeriau, Phys. Rev. Lett. 129, 230401 (2022).

[17] R. L. Hudson, Rep. Math. Phys. 6, 249 (1974).

[18] F. Soto and P. Claverie, J. Math. Phys. 24, 97 (1983).

[19] D. Gross, J. Math. Phys. 47, 122107 (2006).

[20] S. Bravyi and A. Kitaev, Phys. Rev. A 71, 022316 (2005).

[21] V. Veitch, C. Ferrie, D. Gross, and J. Emerson, New J. Phys. 14, 113011 (2012).

[22] V. Veitch, S. H. Mousavian, D. Gottesman, and J. Emerson, New J. Phys. 16, 013009 (2014).

[23] D. Gottesman, (1998), arXiv:quant-ph/9807006 [quant-ph].

[24] S. D. Bartlett, B. C. Sanders, S. L. Braunstein, and K. Nemoto, Phys. Rev. Lett. 88, 097904 (2002).
[25] S. D. Bartlett and B. C. Sanders, Phys. Rev. Lett. 89, 207903 (2002).

[26] C. Cormick, E. F. Galvão, D. Gottesman, J. P. Paz, and A. O. Pittenger, Phys. Rev. A 73, 012301 (2006).

[27] A. Mari and J. Eisert, Phys. Rev. Lett. 109, 230503 (2012).

[28] V. Veitch, N. Wiebe, C. Ferrie, and J. Emerson, New J. Phys. 15, 013037 (2013).

[29] H. Pashayan, J. J. Wallman, and S. D. Bartlett, Phys. Rev. Lett. 115, 070501 (2015).

[30] S. Rahimi-Keshari, T. C. Ralph, and C. M. Caves, Phys. Rev. X 6, 021039 (2016).

[31] L. Kocia, Y. Huang, and P. Love, Entropy 19 (2017).

[32] R. Takagi and Q. Zhuang, Phys. Rev. A 97, 062337 (2018).

[33] F. Albarelli, M. G. Genoni, M. G. Paris, and A. Ferraro, Phys. Rev. A 98, 052350 (2018).

[34] D. Gottesman, Stabilizer codes and quantum error correction (California Institute of Technology, 1997).

[35] D. A. Lidar and T. A. Brun, *Quantum error correction* (Cambridge university press, 2013).

[36] J. Roffe, Contemporary Physics 60, 226 (2019).

[37] V. V. Albert, (2022), arXiv:2211.05714 [quant-ph].

[38] D. Gottesman, A. Kitaev, and J. Preskill, Phys. Rev. A 64, 012310 (2001).

[39] J. E. Bourassa, R. N. Alexander, M. Vasmer, A. Patil, I. Tzitrin, T. Matsuura, D. Su, B. Q. Baragiola, S. Guha, G. Dauphinais, K. K. Sabapathy, N. C. Menicucci, and I. Dhand, *Quantum* 5, 392 (2021).

[40] V. V. Sivak, A. Eickbusch, B. Royer, S. Singh, I. Tsioutsios, S. Ganjam, A. Miano, B. L. Brock, A. Z. Ding, L. Frunzio, S. M. Girvin, R. J. Schoelkopf, and M. H. Devoret, *Nature* 616, 50–55 (2023).

[41] J. Conrad, J. Eisert, and F. Arzani, *Quantum* 6, 648 (2022).

[42] B. M. Terhal and D. Weigand, Phys. Rev. A 93, 012315 (2016).

[43] N. Fabre and S. Felicetti, Phys. Rev. A 104, 022208 (2021).

[44] F. Rozpedek, K. P. Seshadreesan, P. Polakos, L. Jiang, and S. Guha, Phys. Rev. Research 5, 043056 (2023).

[45] C. Vuillot, H. Asasi, Y. Wang, L. P. Pryadko, and B. M. Terhal, Phys. Rev. A 99, 032344 (2019).

[46] C. Flühmann, T. L. Nguyen, M. Marinelli, V. Negnevitsky, K. Mehta, and J. P. Home, Nature 566, 513 (2019).

[47] P. Campagne-Ibarcq, A. Eickbusch, S. Touzard, E. Zalys-Geller, N. E. Frattini, V. V. Sivak, P. Reinhold, S. Puri, S. Shankar, R. J. Schoelkopf, L. Frunzio, M. Mirrahimi, and M. H. Devoret, Nature 584, 368–372 (2020).

[48] S. Konno, W. Asavanant, F. Hanamura, H. Nagayoshi, K. Fukui, A. Sakaguchi, R. Ide, F. China, M. Yabuno, S. Miki, H. Terai, K. Takase, M. Endo, P. Marek, R. Filip, P. van Loock, and A. Furusawa, Science 383, 289 (2024).

[49] N. Fabre, G. Maltese, F. Appas, S. Felicetti, A. Ketterer, A. Keller, T. Coudreau, F. Baboux, M. I. Amanti, S. Ducci, and P. Milman, Phys. Rev. A 102, 012607 (2020).

[50] R. Dahan, G. Baranes, A. Gorlach, R. Ruimy, N. Rivera, and I. Kaminer, Phys. Rev. X 13, 031001 (2023).

[51] L. García-Álvarez, C. Calcluth, A. Ferraro, and G. Ferrini, Phys. Rev. Res. 2, 043322 (2020).

[52] C. Calcluth, A. Ferraro, and G. Ferrini, *Quantum* 6, 867 (2022).

[53] B. Q. Baragiola, G. Pantaleoni, R. N. Alexander, A. Karanjai, and N. C. Menicucci, Phys. Rev. Lett. 123, 200502 (2019).

[54] H. Yamasaki, T. Matsuura, and M. Koashi, Phys. Rev. Res. 2, 023270 (2020).

[55] C. Calcluth, A. Ferraro, and G. Ferrini, Phys. Rev. A 107, 062414 (2023).

[56] O. Hahn, A. Ferraro, L. Hultquist, G. Ferrini, and L. García-Álvarez, Phys. Rev. Lett. 128, 210502 (2022).

[57] O. Hahn, G. Ferrini, and R. Takagi, (2024), arXiv:2406.06418 [quant-ph].

[58] C. Calcluth, N. Reichel, A. Ferraro, and G. Ferrini, PRX Quantum 5, 020337 (2024).

[59] C. Brif and A. Mann, Phys. Rev. A 59, 971 (1999).

[60] K. E. Cahill and R. J. Glauber, Phys. Rev. 177, 1857 (1969).

[61] K. E. Cahill and R. J. Glauber, Phys. Rev. 177, 1882 (1969).

[62] F. E. Schroek Jr, *Quantum mechanics on phase space*, Vol. 74 (Springer Science & Business Media, 2013).

[63] A. M. Perelomov, Commun. Math. Phys. 26, 222–236 (1972).

[64] A. Vourdas, Rep. Prog. Phys. 67, 267 (2004).

[65] B. Leaf, J. Math. Phys. 9, 65 (1968).

[66] A. Grossmann, Commun. Math. Phys. 48, 191–194 (1976).

[67] A. Royer, Phys. Rev. A 15, 449 (1977).

[68] V. V. Albert, K. Noh, K. Duivenvoorden, D. J. Young, R. T. Brierley, P. Reinhold, C. Vuillot, L. Li, C. Shen, S. M. Girvin, B. M. Terhal, and L. Jiang, Phys. Rev. A 97, 032346 (2018).

[69] A. L. Grimsmo and S. Puri, PRX Quantum 2, 020101 (2021).

[70] A. J. Brady, A. Eickbusch, S. Singh, J. Wu, and Q. Zhuang, Prog. Quantum Electron. 93, 100496 (2024).

[71] G. Pantaleoni, B. Q. Baragiola, and N. C. Menicucci, Phys. Rev. A 107, 062611 (2023).

[72] Y. Aharonov, H. Pendleton, and A. Petersen, Int. J. Theor. Phys. 2, 213–230 (1969).

[73] J. Zak, Phys. Rev. Lett. 19, 1385 (1967).

[74] B.-G. Englert, K. L. Lee, A. Mann, and M. Revzen, J. Phys. A: Math. Gen. 39, 1669 (2006).

[75] A. Ketterer, A. Keller, S. P. Walborn, T. Coudreau, and P. Milman, Phys. Rev. A 94, 022325 (2016).

[76] N. Fabre, A. Keller, and P. Milman, Phys. Rev. A 102, 022411 (2020).

[77] S. De Bièvre, M. D. Esposti, and R. Giachetti, Commun. Math. Phys. 176, 73 (1996).

[78] K. Kowalski and J. Rembieliński, Phys. Rev. A 75, 052102 (2007).

[79] M. Ligabò, J. Math. Phys. 57, 082110 (2016).

[80] P. Busch and P. J. Lahti, Phys. Lett. A 115, 259–264 (1986).

[81] A. Ketterer, *Modular variables in quantum information*, Ph.D. thesis, Université Paris 7, Sorbonne Paris Cité (2016).

[82] J. Bertrand and P. Bertrand, Found. Phys. 17, 397 (1987).

[83] K. Vogel and H. Risken, Phys. Rev. A 40, 2847 (1989).

[84] A. J. E. M. Janssen, Philips J. Res. 43, 23 (1988).
[85] A. Mann, M. Revzen, and J. Zak, J. Phys. A: Math. Gen. 38, L389 (2005).

[86] A. Mann, M. Revzen, and J. Zak, Int. J. Quantum Inf. 04, 173–180 (2006).

[87] L. Feng and S. Luo, Int. J. Theor. Phys. 63, 40 (2024).

[88] R. P. Feynman, Statistical Mechanics: A Set Of Lectures, 1st ed. (CRC Press, Boca Raton, 1998).

[89] R. Simon, N. Mukunda, and B. Dutta, Phys. Rev. A 49, 1567 (1994).

[90] S. Olivares, Eur. Phys. J.: Spec. Top. 203, 3–24 (2012).

[91] D. Mumford, Tata Lectures on Theta 1, Modern Birkhäuser Classics (Birkhäuser Boston, Boston, MA, 2007).

[92] B. M. Terhal and D. Weigand, Phys. Rev. A 93, 012315 (2016).

[93] K. R. Motes, B. Q. Baragiola, A. Gilchrist, and N. C. Menicucci, Phys. Rev. A 95, 053819 (2017).

[94] T. Matsuura, H. Yamasaki, and M. Koashi, Phys. Rev. A 102, 032408 (2020).

[95] V. V. Albert, J. P. Covey, and J. Preskill, Phys. Rev. X 10, 031050 (2020).

[96] A. Asadian, C. Brukner, and P. Rabl, Phys. Rev. Lett. 112, 190402 (2014).

[97] A. Asadian, C. Budroni, F. E. Steinhoff, P. Rabl, and O. Gühne, Phys. Rev. Lett. 114, 250403 (2015).

[98] C. Flühmann, V. Negnevitsky, M. Marinelli, and J. P. Home, Phys. Rev. X 8, 021001 (2018).

[99] J.-P. Gazeau and R. Murenzi, Quantum Rep. 4, 362 (2022).

[100] J. Zak, Phys. Rev. 168, 686 (1968).

## Appendix A: The Zak picture and theta functions

In this section we provide additional background on the Zak representation of quantum mechanics and theta functions. The Zak transform of a function $\psi \in L^2(\mathbb{R})$ is

$$[Z_{\alpha}\psi](k, q) = \sqrt{\frac{\alpha}{2\pi}} \sum_{n \in \mathbb{Z}} e^{ikn\alpha} \psi(q - n\alpha), \qquad (A1)$$

where $\alpha$ is a characteristic length [73, 84, 100] (see also [71] for a recent treatment). The image of the Zak transform consists of quasiperiodic functions on $\mathbb{R}^2$, equipped with the usual $L^2$-inner product but restricted to any rectangle of area $2\pi$ (i.e., the Planck constant $h = 2\pi\hbar$ with units restored). With respect to this inner product the Zak transform is a unitary isomorphism between the Schrödinger representation and the Zak representation of the Heisenberg–Weyl group:

$$\int_{0}^{\alpha} dq \int_{0}^{\frac{2\pi}{\alpha}} dk [Z_{\alpha}\psi]^{*}(k, q) [Z_{\alpha}\phi](k, q) = \int_{\mathbb{R}} dx \psi^{*}(x) \phi(x), \qquad (A2)$$

where $\psi, \phi \in L^2(\mathbb{R})$ and we chose the rectangle $[0, \alpha) \times [0, 2\pi/\alpha)$ without loss of generality. Because of this, only the values of $Z\psi$ from any rectangle of area $2\pi$ are needed to completely specify a pure state. The output Hilbert space is denoted $L^2(\mathbb{T}^2)$ for a torus $\mathbb{T}^2$, but it is understood that $Z_{\alpha}\psi$ is only quasiperiodic,

$$[Z_{\alpha}\psi](k - \frac{2\pi}{\alpha}, q) = [Z_{\alpha}f](k, q) \qquad (A3)$$

$$[Z_{\alpha}\psi](k, q - \alpha) = e^{-ik\alpha}[Z_{\alpha}f](k, q),$$

and so strictly speaking is a function on $\mathbb{R}^2$. The image of the position basis under the Zak transform constitutes the Zak basis

$$|k, q\rangle = \sqrt{\frac{\alpha}{2\pi}} \sum_{n \in \mathbb{Z}} e^{ikn\alpha} |q + n\alpha\rangle_{\hat{x}}, \qquad (A4)$$

which, as a consequence of (A2), is complete in the full infinite-dimensional Hilbert space $\mathcal{H}$,

$$\int_{0}^{\alpha} dq \int_{0}^{\frac{2\pi}{\alpha}} dk |k, q\rangle\langle k, q| = \hat{\mathfrak{I}}. \qquad (A5)$$

The Zak measurement is the PVM of projectors onto the Zak basis, $\{|k, q\rangle\langle k, q|\}$. This is strongly related to modular variables [71, 72, 75], and is also called a modular measurement. Outcomes are obtained with a probability determined by the standard Born rule,

$$\mathrm{Pr}[(k, q)|\hat{\rho}] = \langle k, q|\hat{\rho}|k, q\rangle. \qquad (A6)$$
Note that the asymmetry in the quasiperiodicity relations (A3) is due to a phase convention initiated by Zak that in some sense “prefers” position over momentum. A symmetric version is available, though we will not use it because much of our Zak-related analysis lives on the measurement level where such phases play less of a role.

The single-variable *theta function* and the single-variable *theta function with characteristics* are

$$ \theta(z, \tau) = \sum_{n \in \mathbb{Z}} e^{i2\pi nz} e^{i\pi n^2 \tau} \quad \text{and} \quad \theta\begin{bmatrix} v_1 \\ v_2 \end{bmatrix}(z, \tau) = \sum_{n \in \mathbb{Z}} e^{i2\pi(n+v_1)(z+v_2)} e^{i\pi(n+v_1)^2}, \qquad (A7) $$

where the characteristics $v_1, v_2 \in \mathbb{Q}$, $z \in \mathbb{C}$, and $\tau$ is an element of the upper half-space of complex numbers, i.e., $\mathrm{Im}[\tau] > 0$ [91]. The N-dimensional generalizations are

$$ \theta(z, \tau) = \sum_{n \in \mathbb{Z}^N} e^{i2\pi n^T z} e^{i\pi n^T \tau n} \quad \text{and} \quad \theta\begin{bmatrix} v_1 \\ v_2 \end{bmatrix}(z, \tau) = \sum_{n \in \mathbb{Z}^N} e^{i2\pi(n+v_1)^T(z+v_2)} e^{i\pi(n+v_1)^T \tau(n+v_1)} \qquad (A8) $$

where now $v_1, v_2 \in \mathbb{Q}^N$, $z \in \mathbb{C}^N$, and $\tau$ is an element of the Siegel upper half-space, i.e., an $N \times N$ symmetric matrix with strictly positive imaginary part [91]. In the single-variable case these functions are often called Jacobi theta functions and in the multi-variable case they are often called Riemann or Siegel theta functions. We will tend to interpret them as functions of $z$ with $\tau$ a tunable parameter.

The key property that connects all of the above is that, up to particular parameter values and phase conventions, the Zak transform of a Gaussian is a theta function. Since the Zak transform is a unitary isomorphism (an intertwiner between Heisenberg-Weyl unitary irreps to be precise), the role of (certain) theta functions in the Zak picture is equivalent to the role of Gaussians in the Schrödinger picture.

## Appendix B: CV Wigner function from Fock reference state

We consider a quantum system described by an infinite-dimensional Hilbert space $\mathcal{H}$ with dynamical symmetry group $G = H_3(\mathbb{C})$, the Heisenberg–Weyl group over $\mathbb{C}$. The Hilbert space has an infinite countable Fock basis $\{|n\rangle\}_{n \in \mathbb{N}}$. For a fixed $n \in \mathbb{N}$, we follow the phase-space construction from [59] with reference state $|n\rangle$ and show that the resulting Wigner function is independent of the choice of $n$.

Any element $g \in G$ can be parametrized as

$$ \pi(g) = e^{i\varphi} e^{i\gamma} \hat{a}^{\dagger} - \gamma^{*} \hat{a}, \qquad (B1) $$

for $\varphi \in \mathbb{R}$ and $\gamma \in \mathbb{C}$, i.e., as a displacement operator up to a global phase. Now:

* The isotropy subgroup of the state $|n\rangle$ is $U(1)$ and thus the phase space is given by $H_3(\mathbb{C})/U(1) \simeq \mathbb{C}$.

* The coherent states are $\hat{D}(\alpha)|n\rangle$ for all $\alpha \in \mathbb{C}$.

* The invariant measure over this space is $d\mu(\alpha) = \frac{d\Re(\alpha)d\Im(\alpha)}{\pi}$.

* The harmonic functions over $L^2(\mathbb{C}, \mu)$ are given by $Y_\nu(\alpha) = e^{\nu\alpha^* - \nu^*\alpha}$, for all $\nu, \alpha \in \mathbb{C}$. The Plancherel measure over the spectrum of the Laplace–Beltrami operator is then given by $\frac{d^2\nu}{\pi} = \frac{d\Re(\nu)d\Im(\nu)}{\pi}$.

With this preliminary material in place, we are ready to determine the real and positive coefficients $\tau_\nu$ and the tensor operators $\hat{D}_\nu$ via Eqs. (31) and (32), which in this case read

$$ |\langle n | \hat{D}^{\dagger}(\beta) \hat{D}(\alpha) | n \rangle|^2 = \int_{\nu \in \mathbb{C}} \frac{d^2 \nu}{\pi} \tau_{\nu} e^{\nu^*(\alpha-\beta)-\nu(\alpha^*-\beta^*)} \qquad (B2) $$

$$ e^{i\varphi_{\nu} \tau_{\nu}^{-1/2}} \hat{D}_{\nu} = \int_{\alpha \in \mathbb{C}} \frac{d^2 \alpha}{\pi} e^{\nu \alpha^* - \nu^* \alpha} \hat{D}(\alpha) |n\rangle \langle n| \hat{D}^{\dagger}(\alpha). \qquad (B3) $$

Setting $\beta = 0$ in the first equation yields $|\langle n | \hat{D}(\alpha) | n \rangle|^2 = e^{-|\alpha|^2} [L_n(|\alpha|^2)]^2 = \int_{\mathbb{C}} \frac{d^2 \nu}{\pi} \tau_{\nu} e^{\nu^* \alpha - \nu \alpha^*}$. Taking the inverse Fourier transform yields

$$ \tau_{\nu} = \left[ \frac{1}{n!} L_n(|\nu|^2) \right]^2 e^{-|\nu|^2}, \qquad (B4) $$
for all $\nu \in \mathbb{C}$. With Eq. (B3), this implies $e^{i\varphi_\nu} \hat{D}_\nu = \frac{n!}{L_n(|\nu|^2)} e^{|\nu|^2/2} \int_C \frac{d^2\alpha}{\pi} e^{\nu\alpha^*-\nu^*\alpha} \hat{D}(\alpha) |n\rangle\langle n| \hat{D}^\dagger(\alpha)$, where $e^{i\varphi_\nu}$ is a phase function which we set to be identically 1. Let us compute:

$$
\begin{align*}
L_n(|\nu|^2) \hat{D}_\nu &= n! e^{|\nu|^2/2} \int_C \frac{d^2\alpha}{\pi} e^{\nu\alpha^*-\nu^*\alpha} \hat{D}(\alpha) |n\rangle\langle n| \hat{D}^\dagger(\alpha) \\
&= e^{|\nu|^2/2} \int_C \frac{d^2\alpha}{\pi} e^{\nu\alpha^*-\nu^*\alpha} \hat{D}(\alpha) \hat{a}^{\dagger n} |0\rangle\langle 0| \hat{a}^n \hat{D}^\dagger(\alpha) \\
&= e^{|\nu|^2/2} \int_C \frac{d^2\alpha}{\pi} e^{\nu\alpha^*-\nu^*\alpha} (\hat{a}^\dagger - \alpha^*)^n \hat{D}(\alpha) |0\rangle\langle 0| \hat{D}^\dagger(\alpha) (\hat{a} - \alpha)^n \\
&= \sum_{k,l=0}^n \binom{n}{k} \binom{n}{l} e^{|\nu|^2/2} \int_C \frac{d^2\alpha}{\pi} e^{\nu\alpha^*-\nu^*\alpha} \hat{a}^{\dagger k} (-\alpha^*)^{n-k} \hat{D}(\alpha) |0\rangle\langle 0| \hat{D}^\dagger(\alpha) \hat{a}^l (-\alpha)^{n-l} \\
&= \sum_{k,l=0}^n \binom{n}{k} \binom{n}{l} (-1)^{k+l} \hat{a}^{\dagger k} \left( e^{|\nu|^2/2} \int_C \frac{d^2\alpha}{\pi} e^{\nu\alpha^*-\nu^*\alpha} \alpha^{n-l} |\alpha\rangle\langle\alpha| \alpha^{*n-k} \right) \hat{a}^l \tag{B5} \\
&= \sum_{k,l=0}^n \binom{n}{k} \binom{n}{l} (-1)^{k+l} \hat{a}^{\dagger k} \hat{a}^{n-l} \left( e^{|\nu|^2/2} \int_C \frac{d^2\alpha}{\pi} e^{\nu\alpha^*-\nu^*\alpha} |\alpha\rangle\langle\alpha| \right) \hat{a}^{\dagger n-k} \hat{a}^l \\
&= \sum_{k,l=0}^n \binom{n}{k} \binom{n}{l} (-1)^{k+l} \hat{a}^{\dagger k} \hat{a}^{n-l} \hat{D}(\nu) \hat{a}^{\dagger n-k} \hat{a}^l \\
&= \sum_{k,l=0}^n \binom{n}{k} \binom{n}{l} (-1)^{k+l} \hat{a}^{\dagger k} \hat{a}^{n-l} (\hat{a}^\dagger - \nu^*)^{n-k} (\hat{a} - \nu)^l \hat{D}(\nu),
\end{align*}
$$

where we have used the expansion of the displacement operator in terms of Glauber coherent states $\hat{D}(\nu) = e^{|\nu|^2/2} \int_C \frac{d^2\alpha}{\pi} e^{\nu\alpha^*-\nu^*\alpha} |\alpha\rangle\langle\alpha|$. At this point, we make use of the commutation relation

$$
\hat{X}^i \hat{Y}^j = \sum_{m=0}^{\min i, j} m! \binom{i}{m} \binom{j}{m} \hat{Y}^{j-m} \hat{X}^{i-m}, \qquad (B6)
$$

valid for all operators $\hat{X}$ and $\hat{Y}$ such that $[\hat{X}, \hat{Y}] = \hat{I}$. For $\hat{X} = \hat{a}, \hat{Y} = \hat{a}^\dagger - \nu^*, i = n-l$, and $j = n-k$ this gives

$$
\begin{align}
L_n(|\nu|^2) \hat{D}_\nu &= \sum_{k,l=0}^n \sum_{m=0}^{\min n-k, n-l} m! \binom{n-l}{m} \binom{n-k}{m} \binom{n}{k} \binom{n}{l} (-1)^{k+l} \nonumber \\
&\quad \times \hat{a}^{\dagger k} (\hat{a}^{\dagger} - \nu^*)^{n-k-m} \hat{a}^{n-l-m} (\hat{a} - \nu)^l \hat{D}(\nu) \nonumber \\
&= \sum_{k,l=0}^n \sum_{m=0}^{\min n-k, n-l} \sum_{u=0}^{n-k-m} \sum_{v=0}^{n-l-m} \binom{n-k-m}{u} \binom{n-l-m}{v} \nonumber \\
&\quad \times m! \binom{n-l}{m} \binom{n-k}{m} \binom{n}{k} \binom{n}{l} (-1)^{k+l+u+v} \nu^{*u} \nu^{*v} \hat{a}^{\dagger n-m-u} \hat{a}^{n-m-v} \hat{D}(\nu) \nonumber \\
&= \sum_{p=0}^n \sum_{u,v=0}^p \sum_{k=0}^{p-u} \sum_{l=0}^{p-v} \binom{p-k}{u} \binom{p-l}{v} \nonumber \\
&\quad \times (n-p)! \binom{n-l}{n-p} \binom{n-k}{n-p} \binom{n}{k} \binom{n}{l} (-1)^{k+l+u+v} \nu^{*u} \nu^{*v} \hat{a}^{\dagger p-u} \hat{a}^{p-v} \hat{D}(\nu) \nonumber \\
&= \sum_{p=0}^n \sum_{u,v=0}^p \frac{(-1)^{u+v}}{p!} \binom{n}{p} \binom{p}{u} \binom{p}{v} \nu^v \nu^{*u} \hat{a}^{\dagger p-u} \hat{a}^{p-v} \nonumber \\
&\quad \times \left( \sum_{k=0}^{p-u} \binom{p-u}{k} (-1)^k \right) \left( \sum_{l=0}^{p-v} \binom{p-v}{l} (-1)^l \right) \hat{D}(\nu). \tag{B7}
\end{align}
$$

where we have set $p = n - m$. Due to the alternating signs in the sums of index $k$ and $l$, all terms vanish in the above
expression except when $u = v = p$. We finally obtain:

$$ L_n(|\nu|^2) \hat{D}_\nu = \left( \sum_{p=0}^{n} \frac{1}{p!} \binom{n}{p} |\nu|^{2p} \right) \hat{D}(\nu) \qquad (B8) \\ = L_n(|\nu|^2) \hat{D}(\nu), $$

so that $D_\nu = \hat{D}(\nu)$ is a displacement operator. Finally, we obtain

$$ \hat{\Delta}(\alpha) = \int_{\mathbb{C}} \frac{d^2\nu}{\pi} e^{\nu\alpha^* - \nu^*\alpha} \hat{D}^{\dagger}(\nu), \qquad (B9) $$

from Eq. (5). In particular, this kernel and the corresponding Wigner function $W_\hat{\rho}(\alpha) = \text{Tr}[\hat{\Delta}(\alpha)\hat{\rho}]$ do not depend on the choice of $n$, and matches with $W_{\hat{\rho}}^{\text{CV}}(\alpha)$ in Eq. (14) (setting $\alpha = \frac{x+ip}{\sqrt{2}}$).

## Appendix C: Wigner function from GKP code space

In this section, we show that the general phase-space construction in Section III leads to Definition 1 of the Zak-Gross Wigner function in the case of the GKP code space, independently of the choice of reference state.

As in the previous section, we consider a quantum system described by an infinite-dimensional Hilbert space $\mathcal{H}$ with dynamical symmetry group $G = H_3(\mathbb{C})$, the Heisenberg-Weyl group over $\mathbb{C}$. Recall that any element $g \in G$ can be parametrized as

$$ \pi(g) = e^{i\varphi} \hat{\rho} e^{i\frac{x\hat{p}}{2}} \hat{\rho} e^{ip\hat{x}} e^{-ix\hat{p}} = e^{i\varphi} \hat{D}(x, p), \qquad (C1) $$

for $\varphi, x, p \in \mathbb{R}$, i.e., as a displacement operator up to a global phase. Recall also the logical Pauli operators for GKP qudits in terms of displacement operators:

$$ \begin{aligned} \hat{Z} &= e^{i\sqrt{\frac{2\pi}{d}}\hat{x}} = e^{i\ell\hat{x}} = \hat{D}(0, \ell), \\ \hat{X} &= e^{-i\sqrt{\frac{2\pi}{d}}\hat{p}} = e^{-i\ell\hat{p}} = \hat{D}(\ell, 0). \end{aligned} \qquad (C2) $$

We now choose a reference state $|\psi_0\rangle \in \mathcal{C}_{\text{GKP}}$ with the same isotropy subgroup $H_{\mathcal{C}_{\text{GKP}}} = U(1) \times \mathbb{Z} \times \mathbb{Z}$ as the code space.

* In this case, the phase space is the continuous torus: $X(H_3, |\text{GKP}\rangle) = H_3/(U(1) \times \mathbb{Z} \times \mathbb{Z}) \simeq \mathbb{T}^2_{d\ell} = [0, d\ell) \times [0, d\ell)$.

* The coherent states are the displaced GKP states $|u, v\rangle_{\psi_0} := \hat{D}(u, v)|\psi_0\rangle$ for $(u, v) \in \mathbb{T}^2_{d\ell}$.

* The invariant measure over $\mathbb{T}^2_{d\ell}$ is $d\mu(u, v) = \frac{1}{d}dudv$.

* The harmonic functions over $L^2(X, \mu)$ are given by $Y_{mn}(u, v) = \frac{1}{\sqrt{2\pi}}e^{i\ell(nv-mu)}$, for all $(m, n) \in \mathbb{Z}^2$ and all $(u, v) \in \mathbb{T}^2_{d\ell}$. They satisfy $\int_{\mathbb{T}^2_{d\ell}} \frac{1}{d}dudv Y_{mn}(u, v)Y_{m'n'}^*(u, v) = \delta_{mm'}\delta_{nn'}$, the (Kronecker) delta function over the spectrum of the Laplace-Beltrami operator, and $\frac{1}{d}\sum_{m,n \in \mathbb{Z}} Y_{mn}(u, v)Y_{mn}^*(u', v') = \delta(u - u')\delta(v - v')$, with the Plancherel measure being $\frac{1}{d}$ times the counting measure over $\mathbb{Z}^2$.

With this preliminary material in place, we are ready to determine the real and positive coefficients $\tau_\nu$ and the tensor operators $\hat{D}_\nu$ via Eqs. (31) and (32) for all $\nu = (m, n) \in \mathbb{Z}^2$, which in this case read

$$ |\langle\psi_0|\hat{D}^\dagger(u, v)\hat{D}(u', v')|\psi_0\rangle|^2 = \frac{1}{d} \sum_{m,n \in \mathbb{Z}} \tau_{mn} \frac{1}{2\pi} e^{i\ell[n(v'-v)-m(u'-u)]} \qquad (C3) $$

$$ \sqrt{2\pi} e^{i\varphi_{mn}} \tau_{mn}^{1/2} \hat{D}_{mn} = \int_{\mathbb{T}^2_{d\ell}} \frac{1}{d} dudv e^{i\ell(nv-mu)} \hat{D}(u, v) |\psi_0\rangle\langle\psi_0| \hat{D}^\dagger(u, v). \qquad (C4) $$

The reference state can be written as a superposition of GKP qudit basis states:

$$ |\psi_0\rangle = \sum_{j=0}^{d-1} c_j |j\rangle, \qquad (C5) $$
where $|\bar{j}\rangle = \frac{1}{\sqrt{l}} \sum_{n \in \mathbb{Z}} |l(n d + j)\rangle_{\hat{x}}$. We will specify conditions on the amplitudes $c_j$ later on. Setting $u' = v' = 0$ in Eq. (C3) yields $|\langle\psi_0|\hat{D}^{\dagger}(u, v)|\psi_0\rangle|^2 = |\langle\psi_0|\hat{D}(u, v)|\psi_0\rangle|^2 = \frac{1}{2\pi d} \sum_{m,n \in \mathbb{Z}} \tau_{mn} e^{i\ell(nv-mu)}$. Since $\langle\psi_0|\hat{D}(u, v)|\psi_0\rangle = 0$ whenever $u \notin \ell\mathbb{Z}$ or $v \notin \ell\mathbb{Z}$, taking the inverse Fourier transform yields

$$ 
\begin{aligned}
\tau_{mn} &= \int_{\mathbb{T}_{d\ell}^2} du dv |\langle\psi_0|\hat{D}(u, v)|\psi_0\rangle|^2 e^{i\ell(nv-mu)} \\
&= \ell^2 \sum_{k,l=0}^{d-1} |\langle\psi_0|\hat{D}(k\ell, l\ell)|\psi_0\rangle|^2 e^{i\ell^2(nl-mk)} \qquad (C6) \\
&= \frac{2\pi}{d} \sum_{k,l=0}^{d-1} |\langle\psi_0|\hat{D}(k\ell, l\ell)|\psi_0\rangle|^2 \omega^{nl-mk},
\end{aligned}
$$

for all $(m, n) \in \mathbb{Z}^2$, where we used $\delta(\frac{u}{\ell} - k) = \ell\delta(u - k\ell)$ and $\delta(\frac{v}{\ell} - l) = \ell\delta(v - kl)$ in the second line, and where we have set $\omega = e^{\frac{2\pi i}{d}}$ in the last line. Now $|\langle\psi_0|\hat{D}(k\ell, l\ell)|\psi_0\rangle|^2 = |\sum_{j=0}^{d-1} c_{j \oplus d k}^* c_{j \oplus d k} \omega^{lj}|^2$, where $\oplus_d$ denotes addition modulo $d$, so

$$ \tau_{mn} = \frac{2\pi}{d} \sum_{k,l,j,j'=0}^{d-1} c_{j' \oplus d k} c_{j' \oplus d k}^* c_{j \oplus d k} \omega^{l(j-j')} \omega^{nl-mk}. \qquad (C7) $$

Summing over $l$, the non-vanishing terms satisfy $n + j - j' = 0 \mod d$ and we get

$$ 
\begin{aligned}
\tau_{mn} &= 2\pi \sum_{k,j=0}^{d-1} c_{j \oplus d n \oplus d k} c_{j \oplus d n}^* c_{j \oplus d k}^* c_j \omega^{-mk} \\
&= 2\pi \sum_{j,j'=0}^{d-1} c_{j' \oplus d n} c_{j' \oplus d n}^* c_{j' \oplus d k} c_j \omega^{-m(j'-j)} \qquad (C8) \\
&= 2\pi \left| \sum_{j=0}^{d-1} c_j c_{j \oplus d n}^* \omega^{mj} \right|^2 \\
&= 2\pi |\langle\psi_0|\hat{D}(n\ell, m\ell)|\psi_0\rangle|^2,
\end{aligned}
$$

where we have set $j' = j \oplus_d k$ in the second line. In what follows, we assume that the amplitudes $c_j$ are such that this quantity is non-vanishing.

With the explicit form of the coefficients $\tau_{mn}$ determined for all $m, n \in \mathbb{Z}$, we now compute Eq. (C4):

$$ 
\begin{aligned}
\sqrt{2\pi} e^{i\varphi_{mn}} \tau_{mn}^{1/2} \hat{D}_{mn} &= \int_{\mathbb{T}_{d\ell}^2} \frac{1}{d} du dv e^{i\ell(nv-mu)} \hat{D}(u, v) |\psi_0\rangle\langle\psi_0| \hat{D}^{\dagger}(u, v) \\
&= \sum_{j,j'=0}^{d-1} c_j c_{j'}^* \sum_{k,k' \in \mathbb{Z}} \int_{\mathbb{T}_{d\ell}^2} \frac{1}{d\ell} du dv e^{i\ell(nv-mu)} e^{-iu\hat{p}} e^{iv\hat{x}} |\ell(kd + j)\rangle\langle\ell(k'd + j')|_{\hat{x}} e^{-iv\hat{x}} e^{iu\hat{p}} \\
&= \frac{1}{d\ell} \sum_{j,j'=0}^{d-1} c_j c_{j'}^* \sum_{k,k' \in \mathbb{Z}} \int_{\mathbb{T}_{d\ell}^2} du e^{-i\ell mu} \left( \int_{\mathbb{T}_{d\ell}^2} dv e^{i\ell v(n+kd+j-k'd-j')} \right) |\ell(kd + j) + u\rangle\langle\ell(k'd + j') + u|_{\hat{x}} \\
&= \sum_{j,j'=0}^{d-1} c_j c_{j'}^* \sum_{k,k' \in \mathbb{Z}} \int_{\mathbb{T}_{d\ell}^2} du e^{-i\ell mu} \delta_{n+kd+j-k'd-j'\hat{x}} |\ell(kd + j) + u\rangle\langle\ell(k'd + j') + u|_{\hat{x}}.
\end{aligned}
\qquad (C9) $$

The Kronecker delta implies $k'd = n + kd + j - j'$ and $j' = j \oplus_d n$. Hence,

$$ 
\begin{aligned}
\sqrt{2\pi} e^{i\varphi_{mn}} \tau_{mn}^{1/2} \hat{D}_{mn} &= \sum_{j=0}^{d-1} c_j c_{j \oplus d n}^* \sum_{k \in \mathbb{Z}} \int_{\mathbb{T}_{d\ell}^2} du e^{-i\ell mu} |\ell(kd + j) + u\rangle\langle\ell(n + kd + j) + u|_{\hat{x}} \\
&= \hat{Z}^{-m} \left( \sum_{j=0}^{d-1} c_j c_{j \oplus d n}^* \omega^{mj} \sum_{k \in \mathbb{Z}} \int_{\mathbb{T}_{d\ell}^2} du_{\hat{x}} |\ell(kd + j) + u\rangle\langle\ell(kd + j) + u|_{\hat{x}} \right) \hat{X}^{-n},
\end{aligned}
\qquad (C10) $$
where we used $e^{i\ell^2 m k d} e^{i\ell^2 m j} = \omega^{mj}$ in the last line. With the change of variable $u' = u + kd\ell$ we obtain

$$ 
\begin{aligned}
\sum_{k \in \mathbb{Z}} \int_{\mathbb{T}_{d\ell}} du_{\hat{x}} |\ell(kd + j) + u\rangle \langle \ell(kd + j) + u|_{\hat{x}} &= \sum_{k \in \mathbb{Z}} \int_{kd\ell}^{(k+1)d\ell} du'_{\hat{x}} |u' + \ell j\rangle \langle u' + \ell j|_{\hat{x}} \\
&= \int_{u' \in \mathbb{R}} du'_{\hat{x}} |u' + \ell j\rangle \langle u' + \ell j|_{\hat{x}} \qquad (C11) \\
&= \int_{u'' \in \mathbb{R}} du''_{\hat{x}} |u''\rangle \langle u''|_{\hat{x}} \\
&= \mathbb{I}.
\end{aligned}
$$

We thus have

$$ 
\begin{aligned}
\sqrt{2\pi} e^{i\varphi_{mn}} \tau_{mn}^{1/2} \hat{D}_{mn} &= \left( \sum_{j=0}^{d-1} c_j c_{j \oplus d n}^* \omega^{mj} \right) (\hat{X}^n \hat{Z}^m)^{\dagger} \qquad (C12) \\
&= \langle \psi_0 | \hat{D}(n\ell, m\ell) | \psi_0 \rangle (\omega^{2^{-1}mn} \hat{X}^n \hat{Z}^m)^{\dagger}.
\end{aligned}
$$

We now set $\varphi_{mn} = \arg(\langle\psi_0|\hat{D}(n\ell, m\ell)|\psi_0\rangle)$. Note that other choices for the phase function leading to Wigner functions that are independent of the choice of reference state are possible. For instance, setting $\varphi_{mn} = \pi mn + \arg(\langle\psi_0|\hat{D}(n\ell, m\ell)|\psi_0\rangle)$ leads to a Wigner function compatible with the DV toroidal Wigner function from [79], whereas our choice leads to a Wigner function compatible with the Gross Wigner function [19]. With Eq. (C8) this finally implies

$$ 
\begin{aligned}
\hat{D}_{mn}^{\dagger} &= \frac{1}{2\pi} \omega^{2^{-1}mn} \hat{X}^n \hat{Z}^m \qquad (C13) \\
&= \frac{1}{2\pi} (-1)^{kl} \hat{D}(n\ell, m\ell).
\end{aligned}
$$

The corresponding SW kernel is given by

$$ \hat{\Delta}^{C_{GKP}}(u, v) = \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} e^{i\ell(nv-mu)} \hat{D}_{mn}^{\dagger} \qquad (C14) $$

$$ = \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} e^{i\ell(nv-mu)} \omega^{2^{-1}mn} \hat{X}^n \hat{Z}^m \qquad (C15) $$

$$ = \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} e^{i\ell(nv-mu)} (-1)^{mn} \hat{D}(n\ell, m\ell) \qquad (C16) $$

$$ = \hat{D}(u, v) \hat{\Delta}^{C_{GKP}}(0, 0) \hat{D}^{\dagger}(u, v), \qquad (C17) $$

for all $(u, v) \in \mathbb{T}_{d\ell}^2$, with $\hat{\Delta}^{C_{GKP}}(0, 0) = \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} (-1)^{mn} \hat{D}(n\ell, m\ell)$. The result is independent of the choice of reference state $|\psi_0\rangle$ with isotropy subgroup $H^{C_{GKP}}$.

## Appendix D: Properties of the Zak–Gross Wigner function

In this section, we prove the properties of the Zak–Gross Wigner function given in the main text. We start by proving Lemma 1 in section D1, then Theorem 2 in section D2 and finally the Stratonovich–Weyl axioms from Theorem 1 in section D3.

### 1. Proof of Lemma 1: Zak–Gross kernel as a logical parity operator

Recall that the kernel associated with the code space $C_{GKP}$ is given by

$$ \hat{\Delta}^{C_{GKP}}(u, v) = \hat{D}(u, v) \hat{\Delta}^{C_{GKP}}(0, 0) \hat{D}^{\dagger}(u, v), \qquad (D1) $$
for all $(u, v) \in \mathbb{T}_{d\ell}^2$, with

$$ 
\begin{aligned}
\hat{\Delta}^{C_{\text{GKP}}}(0,0) &= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} (-1)^{mn} \hat{D}(\ell n, \ell m) \\
&= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} \omega^{2^{-1}mn} \hat{X}^n \hat{Z}^m,
\end{aligned}
\qquad (\text{D2})
$$

In order to relate $\hat{\Delta}^{C_{\text{GKP}}}(0,0)$ to the parity operator on the code space $\mathcal{C}_{\text{GKP}}$, we compute its action on the position basis:

$$ 
\begin{aligned}
\hat{\Delta}^{C_{\text{GKP}}}(0,0) |x\rangle_{\hat{x}} &= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} \omega^{2^{-1}mn} \hat{X}^n \hat{Z}^m |x\rangle_{\hat{x}} \\
&= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} \omega^{2^{-1}mn} e^{-in\ell\hat{p}} e^{im\ell\hat{x}} |x\rangle_{\hat{x}} \qquad (\text{D3}) \\
&= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} \omega^{2^{-1}mn} e^{im\ell x} |x + \ell n\rangle_{\hat{x}}
\end{aligned}
$$

where $\ell = \sqrt{\frac{2\pi}{d}}$. Split the summations according to

$$ 
\begin{aligned}
m &= b + dm' && \text{where } a, b \in \mathbb{Z}_d, \quad m', n' \in \mathbb{Z}. \qquad (\text{D4}) \\
n &= a + dn' &&
\end{aligned}
$$

Because $2^{-1} = \left(\frac{d+1}{2}\right) \in \mathbb{Z}$ the phase factor reduces from $\omega^{2^{-1}nm}$ to $\omega^{2^{-1}ab}$, yielding

$$ \frac{1}{2\pi} \sum_{a,b \in \mathbb{Z}_d} \sum_{m',n' \in \mathbb{Z}} \omega^{2^{-1}ab} e^{ib(b+dm')\ell x} |x + \ell a + d\ell n'\rangle_{\hat{x}}. \qquad (\text{D5}) $$

Isolate the $m'$-sum and apply Poisson summation:

$$ \sum_{m' \in \mathbb{Z}} e^{idm'\ell x} = \sum_{m'} \delta\left(\frac{d\ell}{2\pi}x - m'\right) = \sum_{m' \in \mathbb{Z}} \delta\left(\frac{x}{\ell} - m'\right) = \ell \sum_{m' \in \mathbb{Z}} \delta(x - m'\ell). \qquad (\text{D6}) $$

To get a non-vanishing result it must be that $x \in \ell\mathbb{Z} \subset \mathbb{R}$. Let this be so and denote $x = x_L\ell + x_Bd\ell$ for $x_L \in \mathbb{Z}_d$ the “logical index” and $x_B \in \mathbb{Z}$ the “bin index”. Now we have

$$ \frac{\ell}{2\pi} \sum_{a,b \in \mathbb{Z}_d} \sum_{n' \in \mathbb{Z}} \omega^{2^{-1}ab} e^{ib\ell^2(x_L+dx_B)} |\ell(a+x_L) + d\ell(n'+x_B)\rangle_{\hat{x}}, \qquad (\text{D7}) $$

but it is clear that $x_B$ is immaterial due to $e^{ib\ell^2 dx_B} = 1$ and the ability to shift the $n'$ sum. So drop $x_B$ and isolate the $b$ sum to get a sum-of-roots:

$$ \sum_{b=0}^{d-1} \omega^{(2^{-1}a+x_L)b} = \begin{cases} d, & 2^{-1}a \oplus_d x_L = 0, \\ 0, & \text{otherwise,} \end{cases} \qquad (\text{D8}) $$

where $\oplus_d$ denotes addition modulo $d$. Solve to get $a = -2x_L$ and finally obtain, with $\frac{d\ell}{2\pi} = \frac{1}{\ell}$,

$$ \hat{\Delta}^{C_{\text{GKP}}}(0,0) |x\rangle_{\hat{x}} = \begin{cases} 0, & x \notin \ell\mathbb{Z}, \\ \frac{1}{\ell} \sum_{n' \in \mathbb{Z}} |\ell(dn' - x_L)\rangle_{\hat{x}}, & x \in \ell\mathbb{Z}, \end{cases} \qquad (\text{D9}) $$

where in the second case $x = x_L\ell + d\ell x_B$ for some $x_L \in \mathbb{Z}_d$ and $x_B \in \mathbb{Z}$. In other words, the operator $\frac{1}{\ell}\hat{\Delta}^{C_{\text{GKP}}}(0,0)$ takes a position eigenstate supported on the logical position lattice $\ell\mathbb{Z} \subset \mathbb{R}$, finds the associated logical index $x_L$, then encodes the reflected state. This transformation on position states is equivalent to the one obtained by the encoded DV parity operator when expressed in the encoded computational basis:

$$ \hat{\Pi}_d(0,0) = \sum_{j=0}^{d-1} |-\bar{j}\rangle\langle\bar{j}|, \qquad (\text{D10}) $$
where $|\bar{j}\rangle = \frac{1}{\sqrt{\ell}} \sum_{n \in \mathbb{Z}} |\ell的日 + j\rangle\rangle_{\hat{x}}$ are codewords (19). Indeed,

$$ \begin{aligned} \hat{\Pi}_d(0,0) |x\rangle_{\hat{x}} &= \sum_{j=0}^{d-1} | -\bar{j} \rangle \langle \bar{j} | x \rangle_{\hat{x}} \\ &= \frac{1}{\sqrt{\ell}} \sum_{j=0}^{d-1} | -\bar{j} \rangle \sum_{n \in \mathbb{Z}} \hat{x} \langle \ell的日 + j | x \rangle_{\hat{x}}. \end{aligned} \qquad (D11) $$

The inner product of position eigenstates gives 0 if $x \notin \ell\mathbb{Z}$. Otherwise, we write as before $x = x_L\ell + d\ell x_B$ for some $x_L \in \mathbb{Z}_d$ and $x_B \in \mathbb{Z}$, and the only nonvanishing term above satisfies $n = x_B$ and $j = x_L$, leading to

$$ \hat{\Pi}_d(0,0) |x\rangle_{\hat{x}} = \begin{cases} 0, & x \notin \ell\mathbb{Z} \\ \frac{1}{\ell} \sum_{n \in \mathbb{Z}} |\ell的日 - x_L\rangle\rangle_{\hat{x}}, & x \in \ell\mathbb{Z}, \end{cases} \qquad (D12) $$

where in the second case $x = x_L\ell + d\ell x_B$ for some $x_L \in \mathbb{Z}_d$ and $x_B \in \mathbb{Z}$. With $\ell = \sqrt{\frac{2\pi}{d}}$, this proves that $\hat{\Delta}^{C_{GKP}}(0,0) = \hat{\Pi}_d(0,0)$ over $\mathcal{H}$ and concludes the proof of Lemma 1.

## 2. Proof of Theorem 2: relating the Zak–Gross and the Gross Wigner functions

A direct consequence of Lemma 1 is

$$ \hat{P}_{(0,0)} \hat{\Delta}^{C_{GKP}}(0,0) \hat{P}_{(0,0)} = \hat{\Delta}^{C_{GKP}}(0,0), \qquad (D13) $$

where $\hat{P}_{(0,0)} = \sum_{j=0}^{d-1} |\bar{j}\rangle\langle\bar{j}|$ is the projector onto the code space $\mathcal{C}_{GKP}$.

Given a density operator $\hat{\rho}$ over $\mathcal{H}$, recall the definition of the (unnormalised) error-corrected state $\hat{\rho}(s,t) = \hat{P}_{(0,0)}\hat{D}^{\dagger}(s,t)\hat{\rho}\hat{D}(s,t)\hat{P}_{(0,0)}$, for all $(s,t) \in \mathbb{T}_{\ell}^2$, where $\ell = \sqrt{\frac{2\pi}{d}}$.

Let $(u,v) \in \mathbb{T}_{\ell d}^2$. Writing $u = a\ell + s$ and $v = b\ell + t$, for $(a,b) \in \mathbb{Z}_d^2$ and $(s,t) \in \mathbb{T}_{\ell}^2$ we have

$$ \begin{aligned} W_{\hat{\rho}}^{C_{GKP}}(u, v) &= \mathrm{Tr}[\hat{D}(u, v) \hat{\Delta}^{C_{GKP}}(0, 0) \hat{D}^{\dagger}(u, v) \hat{\rho}] \\ &= \mathrm{Tr}[\hat{D}(a\ell + s, b\ell + t) \hat{\Delta}^{C_{GKP}}(0, 0) \hat{D}^{\dagger}(a\ell + s, b\ell + t) \hat{\rho}] \\ &= \mathrm{Tr}[\hat{D}(s, t) \hat{D}(a\ell, b\ell) \hat{\Delta}^{C_{GKP}}(0, 0) \hat{D}^{\dagger}(a\ell, b\ell) \hat{D}^{\dagger}(s, t) \hat{\rho}] \\ &= \mathrm{Tr}[\hat{D}(a\ell, b\ell) \hat{P}_{(0,0)} \hat{\Delta}^{C_{GKP}}(0, 0) \hat{P}_{(0,0)} \hat{D}^{\dagger}(a\ell, b\ell) \hat{D}^{\dagger}(s, t) \hat{\rho}] \\ &= \mathrm{Tr}[\hat{D}(a\ell, b\ell) \hat{\Delta}^{C_{GKP}}(0, 0) \hat{D}^{\dagger}(a\ell, b\ell) \hat{P}_{(0,0)} \hat{D}^{\dagger}(s, t) \hat{\rho}] \\ &= \mathrm{Tr}[\hat{D}(a\ell, b\ell) \hat{\Pi}_d(0, 0) \hat{D}^{\dagger}(a\ell, b\ell) \hat{\rho}(s, t)] \\ &= \mathrm{Tr}[\hat{\Pi}_d(a, b) \hat{\rho}(s, t)] \\ &= \mathrm{Tr}[\hat{\Pi}_d(a, b) \hat{\rho}(s, t)] \\ &= W_{\hat{\rho}(s,t)}^{\mathrm{DV}}(a, b), \end{aligned} \qquad (D14) $$

where we have used Eq. (D13) in the 4th line, Lemma 1 in the 5th line, and identified the codeword $\hat{\rho}(s,t)$ with its corresponding DV logical state $\hat{\rho}(s,t)$ in the 8th line, together with the definition of the DV Wigner function (14).

## 3. Proof of Theorem 1: Stratonovich–Weyl axioms for the Zak–Gross Wigner function

We now turn to the proof of the SW axioms (i')-(v') for the Zak–Gross Wigner function associated with the code space $\mathcal{C}_{GKP}$. We recall the expression of the twirling map

$$ \mathcal{E}(\hat{A}) = \int_{\mathbb{T}_{\ell}^2} ds dt \hat{P}_{(s,t)} \hat{\rho} \hat{P}_{(s,t)}, \qquad (D15) $$

where $\hat{P}_{(s,t)}$ is the projector onto a displaced code space defined in Eq. (25).
(i') : The linearity part is trivial. Let $\hat{A}$ and $\hat{B}$ be operators over $\mathcal{H}$ such that $W_{\hat{A}}^{\mathcal{C}_{\text{GKP}}}(u,v) = W_{\hat{B}}^{\mathcal{C}_{\text{GKP}}}(u,v)$ for all $(u,v) \in \mathbb{T}_{d\ell}^2$. By Theorem 2 and the fact that the Gross Wigner function is one-to-one, this implies $\hat{A}(s,t) = \hat{B}(s,t)$ for all $(s,t) \in \mathbb{T}_{\ell}^2$, and thus $\mathcal{E}(\hat{A}) = \mathcal{E}(\hat{B})$. Reciprocally, assume that $\mathcal{E}(\hat{A}) = \mathcal{E}(\hat{B})$. For all $(s,t) \in \mathbb{T}_{\ell}^2$ we have $\hat{P}_{(s,t)}\mathcal{E}(\hat{A})\hat{P}_{(s,t)} = \hat{P}_{(s,t)}\mathcal{E}(\hat{B})\hat{P}_{(s,t)}$. Since $\hat{P}_{(s,t)}$ are orthogonal projectors, $\hat{P}_{(s,t)}\mathcal{E}(\hat{A})\hat{P}_{(s,t)} = \hat{P}_{(s,t)}\hat{A}\hat{P}_{(s,t)}$ and similarly for $\hat{B}$. Hence, $\hat{P}_{(s,t)}\hat{A}\hat{P}_{(s,t)} = \hat{P}_{(s,t)}\hat{B}\hat{P}_{(s,t)}$ and thus $\hat{A}(s,t) = \hat{B}(s,t)$ for all $(s,t) \in \mathbb{T}_{\ell}^2$. With Theorem 2 this implies $W_{\hat{A}}^{\mathcal{C}_{\text{GKP}}}(u,v) = W_{\hat{B}}^{\mathcal{C}_{\text{GKP}}}(u,v)$ for all $(u,v) \in \mathbb{T}_{d\ell}^2$.

(ii') : This is a direct consequence of Definition 1 and, e.g., Lemma 1.

(iii') : By Lemma 1, $\text{Tr}[\hat{A}^{\mathcal{C}_{\text{GKP}}}(0,0)] = 1$, so $W_{\hat{A}}^{\mathcal{C}_{\text{GKP}}}(u,v) = 1$ for all $(u,v) \in \mathbb{T}_{d\ell}^2$. This property then follows from (v') with $\hat{B} = \hat{I}$.

(iv') : Consider a continuous displacement $\hat{D}(x,p)$. Covariance under these transformations follows essentially by construction: for all $(u,v) \in \mathbb{T}_{d\ell}^2$,

$$
\begin{align}
\hat{D}^{\dagger}(x,p) \hat{\Delta}^{\mathcal{C}_{\text{GKP}}}(u,v) \hat{D}(x,p) &= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} (-1)^{mn} e^{i\ell(nv - mu)} \hat{D}(-x, -p) \hat{D}(\ell n, \ell m) \hat{D}^{\dagger}(-x, -p) \nonumber \\
&= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} (-1)^{mn} e^{i\ell(nv - mu)} e^{-i(-x\ell m + p\ell n)} \hat{D}(\ell n, \ell m) \tag{D16} \\
&= \frac{1}{2\pi} \sum_{m,n \in \mathbb{Z}} (-1)^{mn} e^{i\ell(n(v-p) - m(u-x))} \hat{D}(\ell n, \ell m) \nonumber \\
&= \hat{\Delta}^{\mathcal{C}_{\text{GKP}}}(u-x, v-p). \nonumber
\end{align}
$$

where we used the commutation relations (8) and where arithmetic operations in the last line are modulo $d\ell$. Hence for the Wigner function,

$$
\begin{align}
W_{\hat{D}(x,p) \hat{\rho} \hat{D}^{\dagger}(x,p)}^{\mathcal{C}_{\text{GKP}}}(u,v) &= \text{Tr}[\hat{D}(x,p) \hat{\rho} \hat{D}^{\dagger}(x,p) \hat{\Delta}^{\mathcal{C}_{\text{GKP}}}(u,v)] \nonumber \\
&= \text{Tr}[\hat{\rho} \hat{D}^{\dagger}(x,p) \hat{\Delta}^{\mathcal{C}_{\text{GKP}}}(u,v) \hat{D}(x,p)] \tag{D17} \\
&= \text{Tr}[\hat{\rho} \hat{\Delta}^{\mathcal{C}_{\text{GKP}}}(u-x, v-p)] \nonumber \\
&= W_{\hat{\rho}}^{\mathcal{C}_{\text{GKP}}}(u-x, v-p), \nonumber
\end{align}
$$

where arithmetic operations in the last line are modulo $d\ell$.

In particular, the logical displacements $\hat{D}(a, b)$ (23) give

$$
W_{\hat{D}(a,b) \hat{\rho} \hat{D}^{\dagger}(a,b)}^{\mathcal{C}_{\text{GKP}}}(u,v) = W_{\hat{\rho}}^{\mathcal{C}_{\text{GKP}}}(u-a\ell, v-b\ell), \quad (\text{D18})
$$

for all $(a,b) \in \mathbb{Z}_d$, while the stabilizer actions are trivial,

$$
W_{\hat{D}(a,b) \hat{\rho} \hat{D}^{\dagger}(a,b)}^{\mathcal{C}_{\text{GKP}}}(u,v) = W_{\hat{\rho}}^{\mathcal{C}_{\text{GKP}}}(u,v). \quad (\text{D19})
$$

(v') : Firstly, note that $\text{Tr}[\mathcal{E}(\hat{A})\mathcal{E}(\hat{B})] = \text{Tr}[\mathcal{E}(\hat{A})\hat{B}] = \text{Tr}[\hat{A}\mathcal{E}(\hat{B})]$ is a direct consequence of the fact that $\hat{P}_{(s,t)}$ are orthogonal projectors for all $\mathbb{T}_{\ell}^2$, together with the linearity and cyclicity of the trace. Now we compute

$$
\begin{align}
\int_{\mathbb{T}_{d\ell}^2} \frac{1}{d} du dv W_{\hat{A}}^{\mathcal{C}_{\text{GKP}}}(u,v) \hat{\Delta}^{\mathcal{C}_{\text{GKP}}}(u,v) &= \frac{1}{d} \int_{\mathbb{T}_{\ell}^2} ds dt \sum_{a,b \in \mathbb{Z}_d} W_{\hat{A}(s,t)}^{\text{DV}}(a,b) \hat{D}(a\ell + s, b\ell + t) \hat{\Delta}^{\mathcal{C}_{\text{GKP}}}(0,0) \hat{D}^{\dagger}(a\ell + s, b\ell + t) \nonumber \\
&= \int_{\mathbb{T}_{\ell}^2} ds dt \hat{D}(s,t) \left[ \frac{1}{d} \sum_{a,b \in \mathbb{Z}_d} W_{\hat{A}(s,t)}^{\text{DV}}(a,b) \hat{\Pi}_d(a,b) \right] \hat{D}^{\dagger}(s,t), \tag{D20}
\end{align}
$$

where we used Lemma 1 in the second line. Applying the GKP-encoding map to the DV reconstruction formula in Eq. (15) yields

$$
\frac{1}{d} \sum_{a,b \in \mathbb{Z}_d} W_{\hat{A}(s,t)}^{\text{DV}}(a,b) \hat{\Pi}_d(a,b) = \hat{A}(s,t), \quad (\text{D21})
$$
for all $(s, t) \in \mathbb{T}_\ell^2$, so the previous equation rewrites as

$$ 
\begin{aligned}
\int_{\mathbb{T}_\ell^2} \frac{1}{d} du dv W_{\hat{A}}^{C_{\text{GKP}}}(u, v) \hat{\Delta}^{C_{\text{GKP}}}(u, v) &= \int_{\mathbb{T}_\ell^2} ds dt \hat{D}(s, t) \hat{A}(s, t) \hat{D}^\dagger(s, t) \\
&= \int_{\mathbb{T}_\ell^2} ds dt \hat{D}(s, t) \hat{P}(0, 0) \hat{D}^\dagger(s, t) \hat{A} \hat{D}(s, t) \hat{P}(0, 0) \hat{D}^\dagger(s, t) \quad (\text{D22}) \\
&= \mathcal{E}(\hat{A}).
\end{aligned}
$$

This shows Eq. (41) in the main text and concludes the proof by linearity using Definition 1.

## Appendix E: Zak measurement via characteristic function

The Zak transform of a pure state $\psi$ is a quasi-periodic function on $\mathbb{R}^2$ (A3), however the “cross-Zak transform” of two states $\psi$ and $\phi$,

$$ [Z_{\alpha}\psi]^*(k, q)[Z_{\alpha}\phi](k, q), \quad (\text{E1}) $$

is exactly periodic on the rectangle $[0, \alpha) \times [0, \frac{2\pi}{\alpha})$. This includes in particular the Zak measurement distribution $|[Z_\alpha\psi](k, q)|^2$. Hence the Fourier series can be computed,

$$ |[Z_{\alpha}\psi](k, q)|^2 = \sum_{n,m} c_{nm} e^{i2\pi \frac{k}{\alpha} n} e^{i2\pi \frac{q}{\alpha} m}, \quad (\text{E2}) $$

with coefficients

$$ c_{nm} = \frac{1}{2\pi} \int_0^\alpha dq \int_0^{\frac{2\pi}{\alpha}} dk |[Z_\alpha \psi](k, q)|^2 e^{-i2\pi \frac{k}{\alpha} n} e^{-i2\pi \frac{q}{\alpha} m}. \quad (\text{E3}) $$

On the other hand it follows from the quasi-periodicity relations (A3) that the following holds for phase-space displacements along the rectangle,

$$ [Z_{\alpha}e^{i\frac{2\pi}{\alpha}\hat{x}}e^{-i\alpha\hat{p}}\psi](k, q) = e^{i\frac{2\pi}{\alpha}q}e^{-i\alpha k}[Z_{\alpha}\psi](k, q). \quad (\text{E4}) $$

This leads to

$$ 
\begin{aligned}
&|[Z_\alpha \psi](k, q)|^2 e^{-i2\pi \frac{k}{\alpha} n} e^{-i2\pi \frac{q}{\alpha} m} = [Z_\alpha \psi]^*(k, q)[Z_\alpha \psi](k, q) e^{-i\alpha k n} e^{-i\frac{2\pi}{\alpha} q m} \\
&= [Z_\alpha \psi]^*(k, q)[Z_\alpha e^{-i\frac{2\pi}{\alpha} m \hat{x}} e^{-i\alpha n \hat{p}} \psi](k, q),
\end{aligned}
\quad (\text{E5}) $$

making the coefficients

$$ c_{nm} = \frac{1}{2\pi} \int_0^\alpha dq \int_0^{\frac{2\pi}{\alpha}} dk [Z_\alpha \psi]^*(k, q) [Z_\alpha e^{-i\frac{2\pi}{\alpha}m\hat{x}} e^{-i\alpha n\hat{p}}\psi](k, q). \quad (\text{E6}) $$

This is the inner product in the Zak representation,

$$ c_{nm} = \frac{1}{2\pi} (Z\psi, Z e^{-i\frac{2\pi}{\alpha}m\hat{x}} e^{-i\alpha n\hat{p}}\psi)_{L^2(\mathbb{T}^2)}, \quad (\text{E7}) $$

which via (A2) can be related to the $L^2(\mathbb{R})$ inner product,

$$ c_{nm} = \frac{1}{2\pi} (\psi, e^{-i\frac{2\pi}{\alpha}m\hat{x}} e^{-i\alpha n\hat{p}}\psi)_{L^2(\mathbb{R})}. \quad (\text{E8}) $$

Using the relations for the CV displacement operator (6) and the CV characteristic function (14) the coefficients further become

$$ c_{nm} = \frac{1}{2\pi} (-1)^{nm} (\psi, \hat{D}(\alpha n, -\frac{2\pi}{\alpha}m)\psi)_{L^2(\mathbb{R}^2)} = \frac{1}{2\pi} (-1)^{nm} \chi_{\psi}(\alpha n, -\frac{2\pi}{\alpha}m). \quad (\text{E9}) $$

The Zak probability distribution $|[Z_\alpha\psi](k, q)|^2$ becomes

$$ \frac{1}{2\pi} \sum_{n,m} (-1)^{nm} \chi_{\psi}(\alpha n, -\frac{2\pi}{\alpha}m) e^{i\alpha kn} e^{i2\pi \frac{q}{\alpha}m} = \frac{1}{2\pi} \sum_{n,m} (-1)^{nm} \chi_{\psi}(\alpha n, \frac{2\pi}{\alpha}m) e^{i\alpha kn} e^{-i2\pi \frac{q}{\alpha}m}. \quad (\text{E10}) $$
Appendix F: Double discrete marginal is equivalent to syndrome measurement distribution

The double discrete marginal of the kernel is

$$
\begin{align*}
\frac{1}{d} \sum_{j,k=0}^{d-1} \hat{\Delta}^{C_{\text{GKP}}}(u-j\ell, v-k\ell) &= \frac{1}{2\pi d} \sum_{j,k=0}^{d-1} \sum_{m,n \in \mathbb{Z}} (-1)^{nm} e^{i\ell(nv-mu)} e^{-i\ell^2 jn} e^{-i\ell^2 km} \hat{D}(\ell n, \ell m) \\
&= \frac{1}{2\pi d} \sum_{m,n \in \mathbb{Z}} (-1)^{nm} e^{i\ell(nv-mu)} \left( \sum_{j=0}^{d-1} \omega^{-jn} \right) \left( \sum_{k=0}^{d-1} \omega^{-km} \right) \hat{D}(\ell n, \ell m) \tag{F1} \\
&= \frac{d}{2\pi} \sum_{m',n' \in \mathbb{Z}} (-1)^{d^2 n' m'} e^{id\ell(n'v-m'u)} \hat{D}(d\ell n', d\ell m') \\
&= \frac{d}{2\pi} \sum_{n',m' \in \mathbb{Z}} (-1)^{n' m'} e^{id\ell(n'v-m'u)} e^{i \frac{d^2 \ell^2 n' m'}{2}} \hat{X}^{dn'} \hat{Z}^{dm'} \\
&= \frac{d}{2\pi} \sum_{m',n' \in \mathbb{Z}} e^{id\ell(n'v-m'u)} \hat{X}^{dn'} \hat{Z}^{dm'}.
\end{align*}
$$

Because our kernel and the code space projectors are related by the same displacements, it is sufficient to compare
the undisplaced case

$$
\sum_{j,k=0}^{d-1} \hat{\Delta}^{C_{\text{GKP}}}(\bar{j}\ell, -k\bar{j}\ell) = \frac{d}{2\pi} \sum_{m,n \in \mathbb{Z}} \hat{X}^{dn} \hat{Z}^{dm} = \frac{d}{2\pi} \sum_{m,n \in \mathbb{Z}} e^{-id\ell n \hat{p}} e^{id\ell m \hat{x}} \quad (\text{F2})
$$

with the undisplaced code space projector $\hat{P}_{(0,0)} = \sum_{j=0}^{d-1} |\bar{j}\rangle\langle\bar{j}|$. Similar to the derivation in section D 1, we obtain

$$
\frac{1}{d} \sum_{j,k=0}^{d-1} \hat{\Delta}^{C_{\text{GKP}}}(\bar{j}\ell, -k\bar{j}\ell) |x\rangle = \begin{cases} \frac{1}{\ell} \sum_{n \in \mathbb{Z}} |nd\ell + x\rangle, & x \in \ell\mathbb{Z} \\ 0, & \text{otherwise,} \end{cases} \quad (\text{F3})
$$

which is identical to the action of $\hat{P}_{(0,0)}$ in position basis.

Appendix G: Derivation of the Zak–Gross Wigner function for thermal states

We seek to compute

$$
W_{\hat{\rho}}^{C_{\text{GKP}}}(u, v) = \text{Tr}[\hat{\Delta}^{C_{\text{GKP}}}(u, v)\hat{p}] = \frac{1}{Z(\beta)} \text{Tr}[\hat{\Delta}^{C_{\text{GKP}}}(u, v)e^{-\beta\hat{H}}], \quad (G1)
$$

where $\hat{H} = \frac{1}{2}(\hat{x}^2 + \hat{p}^2)$ is the oscillator Hamiltonian and $Z(\beta) = \frac{1}{2 \sinh(\frac{\beta}{2})}$ is the partition function [88]. We proceed entirely in the position basis

$$
W_{\hat{\rho}}^{C_{\text{GKP}}}(u, v) = \int dx' \langle x' | \bar{\Delta}_d(u, v) \frac{e^{-\beta \hat{H}}}{Z(\beta)} | x' \rangle = \iint dx' dx' \langle x' | \hat{\Delta}^{C_{\text{GKP}}}(u, v) | x \rangle \langle x | \frac{e^{-\beta \hat{H}}}{Z(\beta)} | x' \rangle, \quad (\text{G2})
$$

where for this appendix section we will drop the $\hat{x}$ subscript in the position kets to reduce clutter. Using the Mehler
kernel,

$$
\langle x | e^{-\beta \hat{H}} | x' \rangle = \frac{1}{\sqrt{2\pi \sinh(\beta)}} e^{-\frac{1}{2} \left[ (x^2 + x'^2) \cosh(\beta) - 2xx' \right]}, \quad (G3)
$$

the thermal state matrix elements can be brought to the form

$$
\langle x | \frac{e^{-\beta \hat{H}}}{Z(\beta)} | x' \rangle = \frac{1}{\sqrt{\pi}} \sqrt{\tanh(\frac{\beta}{2})} e^{-\frac{1}{4} \left[ (x+x')^2 \tanh(\frac{\beta}{2}) + (x-x')^2 \coth(\frac{\beta}{2}) \right]} . \quad (G4)
$$
The matrix elements of the kernel are

$$ 
\begin{aligned}
\langle x'|\hat{\Delta}^{C_{GKP}}(u,v)|x\rangle &= \frac{1}{2\pi} \sum_{n,m \in \mathbb{Z}} \omega_d^{2^{-1}nm} e^{i\ell(nv-mu)} \langle x'|\hat{X}^n \hat{Z}^m|x\rangle \\
&= \frac{1}{2\pi} \sum_{n,m \in \mathbb{Z}} \omega_d^{2^{-1}nm} e^{i\ell(nv-mu)} e^{im\ell x} \delta_{x',x+n\ell}.
\end{aligned}
\quad (G5) $$

Plug the above into (G2) and use the delta $\delta_{x',x+n\ell}$ to remove the $x'$ integral,

$$ W_{\hat{\rho}}^{C_{GKP}}(u,v) = \frac{1}{2\pi\sqrt{\pi}} \sqrt{\tanh(\frac{\beta}{2})} \sum_{n,m \in \mathbb{Z}} \omega_d^{2^{-1}nm} e^{i\ell(nv-mu)} \int dx e^{im\ell x} e^{-\frac{1}{4}[(2x+n\ell)^2 \tanh(\frac{\beta}{2})+(n\ell)^2 \coth(\frac{\beta}{2})]}. \quad (G6) $$

The integral can be put into the form of the weighted Gaussian $\int dx e^{irx} e^{-ax^2+bx+c}$ with

$$ r = m\ell \qquad a = \tanh(\frac{\beta}{2}) \qquad b = -n\ell \tanh(\frac{\beta}{2}) \qquad c = -\frac{1}{4}(n\ell)^2[\tanh(\frac{\beta}{2}) + \coth(\frac{\beta}{2})]. \quad (G7) $$

This integral has solution

$$ \int dx e^{irx} e^{-ax^2+bx+c} = \sqrt{\frac{\pi}{a}} e^{\frac{(b+ir)^2}{4a}} + c = \sqrt{\frac{\pi}{a}} e^{\frac{br}{2a}} e^{\frac{b^2-r^2}{4a}} + c \quad (G8) $$

for $a > 0$. Here $a = \tanh(\frac{\beta}{2}) > 0$ for all finite temperature $T = \frac{1}{\beta}$. Inserting and simplifying, we get

$$ 
\begin{aligned}
W_{\hat{\rho}}^{C_{GKP}}(u,v) &= \frac{1}{2\pi} \sum_{n,m \in \mathbb{Z}} \omega_d^{2^{-1}nm} e^{i\ell(nv-mu)} e^{-i\frac{\pi}{d}nm} e^{-\frac{\pi}{d}(n^2+m^2)^{\frac{1}{2}}\coth(\frac{\beta}{2})} \\
&= \frac{1}{2\pi} \sum_{n,m \in \mathbb{Z}} (-1)^{nm} e^{i\ell(nv-mu)} e^{-\frac{\pi}{d}(n^2+m^2)^{\frac{1}{2}}\coth(\frac{\beta}{2})} \quad (G9) \\
&= \frac{1}{2\pi} \sum_{n,m \in \mathbb{Z}} (-1)^{nm} e^{i\ell(nv-mu)} e^{-\frac{\pi}{d}(n^2+m^2)(\hat{H})_{\beta}},
\end{aligned}
$$

where $\langle \hat{H} \rangle_{\beta} = \frac{1}{2} \coth(\frac{\beta}{2})$ is the energy expectation value [88].

## Appendix H: Physical GKP state derivation

It is convenient here to work in the position basis. There, the Zak-Gross Wigner function (1) of a pure state $|\psi\rangle$ is expressed as

$$ W_{\psi}^{C_{GKP}}(u,v) = \frac{1}{2\pi} \sum_{n,m \in \mathbb{Z}} \omega_d^{2^{-1}nm} e^{i\ell(nv-mu)} \int dx e^{im\ell x} \psi^*(x+n\ell)\psi(x), \quad (H1) $$

where $\psi(x) = \langle x|\psi \rangle$. We have (see [94, Equation (24)])

$$ \psi_j^-(x) \sim \sum_{n \in \mathbb{Z}} e^{-\frac{1}{2} \kappa^2 (j\ell + d\ell n)^2} e^{-\frac{1}{2} \frac{(x-j\ell-d\ell n)^2}{\sigma^2}} \equiv \sum_{n \in \mathbb{Z}} c_n e^{-\frac{1}{2} \frac{(x-j\ell-d\ell n)^2}{\sigma^2}}. \quad (H2) $$

Then we have

$$ 
\begin{aligned}
e^{im\ell x} \psi^*(x+n\ell) \psi(x) &= \sum_{k,k'} e^{im\ell x} c_k c_{k'} e^{-\frac{1}{2} \frac{(x+n\ell-j\ell-d\ell k)^2}{\sigma^2}} e^{-\frac{1}{2} \frac{(x-j\ell-d\ell k')^2}{\sigma^2}} \\
&= \sum_{k,k'} e^{im\ell x} c_k c_{k'} e^{-\frac{1}{2} [(x+n\ell-j\ell-d\ell k)^2 + (x-j\ell-d\ell k')^2]}
\end{aligned}
\quad (H3) $$
where recall the position wavefunction is real. This Gaussian integral evaluates to

$$ \int dx e^{im\ell x} \psi^*(x+n\ell) \psi(x) = \sqrt{\pi\sigma} \sum_{k,k'} c_k c_{k'} e^{\left(-\frac{\ell^2}{4\sigma^2}\left(-2im\sigma^2(dk+dk'+2j-n)+(dk'-dk+n)^2+m^2\sigma^4\right)\right)}. \quad (H4) $$

Absorbing the constant factor of $\sqrt{\pi\sigma}$ into the normalization, the Zak–Gross Wigner function becomes

$$ \begin{aligned} W_{|j\rangle}^{C_{GKP}}(u, v) &\sim \sum_{n,m,k,k'} e^{i\ell(nv-mu)} e^{i\pi nm} e^{i\frac{nm\ell^2}{2}} c_k c_{k'} e^{\left(-\frac{\ell^2}{4\sigma^2}\left(-i2m\sigma^2(dk+dk'+2j-n)+(dk'-dk+n)^2+m^2\sigma^4\right)\right)} \\ &= \sum_{n,m,k,k'} e^{i\ell(nv-mu)} e^{i\pi nm} c_k c_{k'} e^{\left(-\frac{\ell^2}{4\sigma^2}\left(-i2m\sigma^2(dk+dk'+2j)+(dk'-dk)^2+2n(dk'-dk)+n^2+m^2\sigma^4\right)\right)} \\ &= \sum_{k,k'} c_k c_{k'} e^{-\frac{\ell^2}{4\sigma^2}(dk'-dk)^2} \sum_{n,m} e^{i\ell(nv-mu)} e^{i\pi nm} e^{\left(-\frac{\ell^2}{4\sigma^2}\left(-i2m\sigma^2(dk+dk'+2j)+2n(dk'-dk)+n^2+m^2\sigma^4\right)\right)} \\ &= \sum_{k,k'} c_k c_{k'} e^{-\frac{\pi d}{2\sigma^2}(k'-k)^2} \underbrace{\sum_{n,m} e^{i\ell(nv-mu)} e^{-\frac{\ell^2}{4\sigma^2}\left(-i2m\sigma^2(dk+dk'+2j)+2n(dk'-dk)\right)}}_{\text{linear in } n,m} \underbrace{e^{i\pi nm} e^{\left(-\frac{\ell^2}{4\sigma^2}(n^2+m^2\sigma^4)\right)}}_{\text{quadratic}}. \end{aligned} \quad (H5) $$

The linear factor simplifies,

$$ \begin{aligned} e^{i\ell(nv-mu)} e^{-\frac{\ell^2}{2\sigma^2}\left(-im\sigma^2(dk+dk'+2j)+n(dk'-dk)\right)} &= e^{i\ell(nv-mu)} e^{i\frac{\ell^2}{2}m(dk+dk'+2j)} e^{-\frac{\ell^2}{2\sigma^2}n(dk'-dk)} \\ &= e^{i2\pi\left[\frac{\ell}{2\pi}(nv-mu)+\frac{\ell^2}{4\pi}m(dk+dk'+2j)+i\frac{\ell^2}{4\pi\sigma^2}n(dk'-dk)\right]} \\ &= e^{i2\pi\left[n\left(\frac{\ell}{2\pi}v+i\frac{\ell^2}{4\pi\sigma^2}(dk'-dk)\right)+m\left(-\frac{\ell}{2\pi}u+i\frac{\ell^2}{4\pi}(dk+dk'+2j)\right)\right]} \\ &= e^{i2\pi\left[n\left(\frac{v}{d\ell}+i\frac{k'-k}{2\sigma^2}\right)+m\left(-\frac{u}{d\ell}+\frac{1}{2}(k+k'+\frac{2}{d}j)\right)\right]}. \end{aligned} \quad (H6) $$

The quadratic factor,

$$ e^{i\pi nm} e^{\left(-\frac{\ell^2}{4\sigma^2}(n^2+m^2\sigma^4)\right)} = e^{i\pi\left[nm + i\frac{\ell^2}{4\pi\sigma^2}n^2 + i\frac{\ell^2}{4\pi}\sigma^2m^2\right]} = e^{i\pi\left[2\frac{nm}{2} + i\frac{n^2}{2d\sigma^2} + i\frac{\sigma^2}{2d}m^2\right]}. \quad (H7) $$

From Eqs. (H6) and (H7) we see that the $(n, m)$-sum is a two dimensional theta function (A8), making the final Zak–Gross Wigner function a summation over such theta functions with weights governed by the Gaussian envelope $\kappa$ through $c_k$:

$$ W_{|j\rangle}^{C_{GKP}}(u, v) \sim \sum_{k,k'} c_k c_{k'} e^{-\frac{\pi d}{2\sigma^2}(k'-k)^2} \theta\left(\frac{v}{d\ell} + i\frac{k'-k}{2\sigma^2}, -\frac{u}{d\ell} + \frac{1}{2}(k+k' + \frac{2}{d}j), \tau\right), \quad \tau = \frac{1}{2} \begin{pmatrix} i \frac{1}{d\sigma^2} & 1 \\ 1 & i \frac{\sigma^2}{d} \end{pmatrix}. \quad (H8) $$