Questions tagged [stim]

For questions about Stim, the open source tool for high-performance simulation of quantum stabilizer circuits.

Filter by
Sorted by
Tagged with
0
votes
1answer
5 views

Where do lines like "error(p) D0 D9 ^ D7 ^ D8" come from in a stim detector error model?

I have a Stim detector error model file derived from a surface code circuit. I'm trying to understand exactly what lines like error(0.00033) D0 D9 L0 ^ D7 ^ D8 from ...
2
votes
1answer
142 views

Incorporating Idling Errors while using Stim

Is there a smart way to incorporate idling errors for a quantum error correction code using the open-source tool Stim (preferably using the tableau simulator)? I have perused the github website (https:...
2
votes
1answer
14 views

How do I initialize stim's tableau simulator to a random tableau?

I want to create a stim.TableauSimulator with a random tableau as its state. I know I can get a random tableau using ...
2
votes
1answer
55 views

Efficient Way to Create an LUT in Stim

What is the fastest and most resource-efficient way to create an LUT decoder for a quantum error correction code using Stim (https://quantum-journal.org/papers/q-2021-07-06-497/)? Specfically, I am ...
4
votes
1answer
114 views

Simulating flag qubits and conditional branches using Stim

In a quantum error correcting code using flag qubits, it's common to have flag measurements that tell you it's necessary to do some extra measurements for safety. So, for example, I want to say: ...
2
votes
1answer
38 views

Stim: is it possible to add comments when creating a circuit?

I'm trying to create a Stim.Circuit, given a list of qubits and operations on them. Does the API support adding comments to the circuit's string representation? I've tried using ...
2
votes
1answer
41 views

Measurement bitstrings to detection event bitstrings in stim

Does Stim have exposed functionality for converting a measurement outcome string into a detection event string? I.e. I feed stim a string of 0,1's corresponding to measurements in a circuit along with ...
3
votes
1answer
382 views

What is the meaning of "shots" and "rounds" in Stim?

I'm running simulations using Stim to get logical error rate vs. physical error rates of some quantum error correcting codes (QECC). I looked into the documentation, but I'm confused about the meaning ...
1
vote
1answer
99 views

how to simulate toric and surface codes with stim + PyMatching

According to PyMatching's github page the package can be decode toric and surface codes. Stim's example uses stim + PyMatching combination to get logical error rate vs physical error rate curves for ...
2
votes
1answer
101 views

Computing expectation value of a Pauli string on stabilizer states

I need some help on stim, where I'm trying to compute expectation values of Pauli strings. Hopefully I did not overlook on the documentation an implementation of ...
1
vote
2answers
91 views

How to perform encoding and syndrome measurement in stim

I can generate the encoding circuit of a stabilizer code and can read it into stim. For example for the $[[5,1,3]]$ code : ...
1
vote
1answer
55 views

What is the syntax for general control gate in stim

For a stabilizer code with the stabilizers in canonical form, an encoding circuit has the form that's a product of hadamard gates and general control gates : $H_i C_i(U_i)$. For example for the $[[5,1,...
2
votes
1answer
82 views

How to import a generic stabilizer code in stim

I just started using stim to simulate the performance of quantum error correcting codes. I hope this is the right place to ask questions about the subject. The example code with the repetition code ...
2
votes
1answer
104 views

How do I pick a random Clifford operation in Stim?

I want to sample random n-qubit Clifford operations. How do I do that in Stim? (Self-answering because this was requested when the feature already existed)
4
votes
1answer
67 views

Performing a generic single-qubit Pauli error channel in stim

I have a Pauli channel with disjoint probabilities $P_I$, $P_X$, $P_Y$, $P_Z$ (meaning $P_I + P_X + P_Y + P_Z = 1$) corresponding to Pauli errors I, X, Y, Z. Is there some way apply this Pauli ...
6
votes
1answer
187 views

'Best practices' for making Stim run as fast as possible?

I'm currently testing out an error-correction surface code circuit in Stim. I've tried a 19x19 surface code over 10k rounds of syndrome extraction sampled 256 times, and this takes about 165 seconds. ...
2
votes
2answers
253 views

Measuring entanglement entropy using a stabilizer circuit simulator

I'm trying to simulate stabilizer circuits using the Clifford tableau formalism that lets you scale up to hundreds of qubits. What I want to do is find the entanglement entropy on by splitting my ...