Learning a classical description of a quantum state is a fundamental task in quantum computation. Among the most important classes of quantum states are stabilizer states, which play a central role in quantum error correction and fault-tolerant computation. To mitigate the effects of realistic noise, agnostic learning of stabilizer states has emerged as a natural and well-motivated problem. Recently, Chen \textit{et al.} [STOC'25, p. 429-438] resolved this problem for qubit systems by using a stabilizer bootstrapping framework. However, the agnostic learning of qudit stabilizer states remains largely unexplored, since the qudit setting introduces fundamental structural differences that prevent a direct generalization of existing qubit techniques. In this paper, we successfully generalize the stabilizer bootstrapping framework to qudit systems and present the first efficient quantum algorithm for agnostic learning of qudit stabilizer states. Specifically, given copies of an unknown
n-qudit pure state
∣ψ⟩ that has fidelity
τ with some stabilizer state, our algorithm outputs a stabilizer state
∣φ⟩ such that
∣⟨φ∣ψ⟩∣2≥τ−ε with high probability. The algorithm uses only single-copy and four-copy measurements, and its sample and time complexity scale as
(d/τ)O(d2log(1/τ))⋅poly(n,1/ε), where the dimension
d is an odd prime. As a direct corollary, our algorithm enables efficient estimation of the magic of a quantum state, as quantified by its stabilizer fidelity. Completing the picture, we also present a streamlined algorithm for the high-fidelity regime
τ>cos2(π/8), establishing a qudit analogue of the threshold-based approach in prior qubit work.
The stabiliser formalism plays a central role in quantum computing, error correction, and fault tolerance. Conversions between and verifications of different specifications of stabiliser states and Clifford gates are important components of many classical algorithms in quantum information, e.g. for gate synthesis, circuit optimisation, and simulating quantum circuits. These core functions are also used in the numerical experiments critical to formulating and testing mathematical conjectures on the stabiliser formalism.We develop novel mathematical insights concerning stabiliser states and Clifford gates that significantly clarify their descriptions. We then utilise these to provide ten new fast algorithms which offer asymptotic advantages over any existing implementations. We show how to rapidly verify that a vector is a stabiliser state, and interconvert between its specification as amplitudes, a quadratic form, and a check matrix. These methods are leveraged to rapidly check if a given unitary matrix is a Clifford gate and to interconvert between the matrix of a Clifford gate and its compact specification as a stabiliser tableau.For example, we extract the stabiliser tableau of a 2n×2n matrix, promised to be a Clifford gate, in O(n2n) time. Remarkably, it is not necessary to read all the elements of a Clifford gate matrix to extract its stabiliser tableau. This is an asymptotic speedup over the best-known method that is exponential in the number of qubits.We provide implementations of our algorithms in Python and C++ that exhibit vastly improved practical performance over existing algorithms in the cases where they exist.
Bravyi and Gosset [S. Bravyi and D. Gosset, Phys. Rev. Lett. 116, 250501 (2016)] recently gave classical simulation algorithms for quantum circuits dominated by Clifford operations. These algorithms scale exponentially with the number of
T gates in the circuit, but polynomially in the number of qubits and Clifford operations. Here we extend their algorithm to qudits of odd prime dimension. We generalize their approximate stabilizer rank method for weak simulation to qudits and obtain the scaling of the approximate stabilizer rank with the number of single-qudit magic states. We also relate the canonical form of qudit stabilizer states to Gauss sum evaluations and give an
O(n3) algorithm for calculating the inner product of two
n-qudit stabilizer states.
We introduce the qudit noisy stabilizer formalism, a framework for efficiently describing the evolution of stabilizer states in prime-power dimensions subject to generalized Pauli-diagonal noise under Clifford operations and generalized Pauli measurements. For arbitrary dimensions, the formalism remains applicable, though restricted to a subset of stabilizer states and operations. The computational complexity scales linearly with the number of qudits in the initial state and exponentially with the number of qudits in the final state. This ensures that when noisy qudit stabilizer states evolve via generalized Pauli measurements and Clifford operations to generate multipartite entangled states of a few qudits, their description remains efficient. We demonstrate this by analyzing the generation of a generalized Bell pair from a noisy linear cluster state subject to two distinct noise sources acting on each of the qudits.
We present a comprehensive and self-contained framework for the efficient classical simulation of Clifford circuits acting on
d-dimensional qudits, including realistic Pauli/Weyl noise via stochastic simulation. Our approach uses the stabilizer tableau formalism for qudits of arbitrary dimension and tracks both stabilizer and destabilizer generators under Clifford updates. The classical simulation remains efficient with simple algebraic Clifford update rules over
Zd. Computational basis measurements in prime dimensions are handled by a generalized Aaronson-Gottesman (CHP) procedure. In composite dimensions,
Zd is not a field and the standard tableau reduction fails, so we employ an exact Smith normal form decomposition to enable efficient sampling. Noise is modelled as probabilistic mixtures of Weyl operators that act only on the tableau's phase column. For fast simulation of noisy circuits, we support Pauli frames, respectively generalized Weyl frames, and introduce a noise-pushing technique that allows all noise processes to be consolidated into a single phase update at the end of the circuit. Using this representation, circuit fidelity can be determined entirely by the single accumulated phase-shift parameter
Δτ, reducing fidelity estimation to a simple phase check per shot. Our codebase supports tableau simulation and conventional state-vector and density-matrix backends for qudits, and also includes circuit and tableau visualisations. Additionally, we provide tests and Jupyter notebooks for validation and illustration. This framework forms the basis for a scalable, open-source strong+weak stabilizer simulator including noise and can be found publicly available at https://github.com/QUICK-JKU/QuickQudits.
Recent work has shown that quantum double models can be used to circumvent the Bravyi-Koenig bound. In particular, this is achieved through code-switching protocols in which non-Pauli stabilizer phases appear as intermediate codes. We introduce the
XCd(k) stabilizer formalism, which generalizes the Pauli stabilizer formalism by combining Pauli-
X operators with diagonal operators drawn from a fixed level
k of the Clifford hierarchy on prime-dimensional qudits. This yields a natural class of beyond-Pauli stabilizer models, including many twisted quantum double phases. We classify a large class of these
XCd(k) stabilizer states, showing that they are uniform superpositions over affine-linear subspaces with diagonal phases. In particular, when the stabilizers of a state require operators from level
k of the Clifford hierarchy, we show that the diagonal gates required to produce the phases in the wavefunction sit one level higher. We further show that every 2D twisted quantum double
Dω(Zpn) with
ω a product of type-III cocycles and
p an odd prime admits a realization using only Clifford (
k=2) stabilizers, and we conjecture that phases where
ω contains a type-I or type-II cocycle require level-
p Clifford-hierarchy stabilizers for
p-dimensional qudits. Finally, we demonstrate that a pair of qudit toric codes may be deterministically prepared in a logical magic state by measuring
XCd(k) stabilizers. Together, these results provide a concrete stabilizer framework for topological codes beyond Pauli stabilizer models and their logical gates.