# Is there any reasonably efficient way of performing qudit circuit simulations using Stim?

Is there any reasonably efficient way of performing qudit circuit simulations using Stim? If so, then how much worse would the computational complexity scale?

Stim only speaks qubits, not qudits. All of the supported gates are qubit gates, and all of the internal data structures are for specifically the qubit case.

There are no plans to add native support for qudits to stim.

(So if it's possible it will take the form of mapping qudit stabilizer circuits into qubit stabilizer circuits.)

• Are there any alternatives to Stim in this case? I believe that Cirq may be an option, but I am open to other suggestions. Mar 10 at 14:40

Since you're mentioning Stim, I guess you mean stabilizer circuits.

I do not know about the capabilities of Stim, but judging from the documentation, it seems to work only for qubits. Nevertheless, the computational complexity is the same, independent of the local dimension of the qudit (assuming that it is prime), i.e. it scales polynomial with the system size $$n$$. The exponent depends on what you want to simulate precisely, but it is at most $$n^3$$ (propagating stabilizer states under global Clifford unitaries + stabilizer basis measurements). What can change is the constant in front of the polynomial scalings. This, however, depends highly on how you implement the simulation and is probably not noticeable in high-level implementations in e.g. Python.

Interestingly, some things are even simpler if the dimension is an odd prime, such as the computation of some phases when updating stabilizer states under arbitrary Clifford unitaries or measuring them w.r.t. Pauli observables.

• Interesting! Could you provide any references for simulating stabilizer circuits on qudits?
– Lior
Mar 11 at 17:06
• Well, it's rather straightforward if you know the qubit formalism. The difference is that instead of binary "tableaux" you'll have tableaux where the entries are from the finite field $\mathbb F_p$ where $p$ is the (prime!) dimension of the qudit. You can look at Gottesman's paper arxiv.org/abs/quant-ph/9802007 ... Otherwise I don't know a good self-contained reference. If you're mathematically inclined, you can have a look at the introductory part of my thesis. Mar 12 at 18:11
• @Lior For the underlying symplectic framework, you can also read Gross's paper arxiv.org/abs/quant-ph/0602001 Mar 12 at 18:19
• Thanks. I’ll take a look. Seems reasonable that it would be straightforward
– Lior
Mar 12 at 19:17