Questions tagged [stim]
For questions about Stim, the open source tool for high-performance simulation of quantum stabilizer circuits.
277 questions
0
votes
1
answer
122
views
Commutation relationship and measurement results
There are things I do not understand about the following circuit, and I would appreciate it if you could explain.
...
0
votes
1
answer
100
views
Inverted memory X and memory Z logical error rates for unrotated surface code in Stim?
The circuit which measures a Z-type stabilisers in the surface code is:
whereas for X-type stabilisers it's:
Both types of stabilisers are measured in a memory experiment in the inbuilt surface code ...
0
votes
1
answer
161
views
Handling lots of data points in Sinter Graphing
Sinter is really awesome for streamlining my circuit runs. It was incredibly easy to set up and switch into, and it's very fast. The save_resume_filepath is a life ...
1
vote
0
answers
156
views
Correctability of X, Y, and Z Errors in Quantum Surface Codes and Color Codes
In surface codes and color codes, when the code distance is $d$, you can correct up to $[(d-1)/2]$ Pauli errors. I would like to know what this $[(d-1)/2]$ Pauli errors means for $X$, $Y$, and $Z$. ...
1
vote
0
answers
366
views
Stim: Implementing lattice surgery
This is an understanding check more than an actual question. Implementing lattice surgery has already been discussed on the forum: How to implement lattice surgery in stim? -- I'm just trying to make ...
0
votes
1
answer
112
views
Sinter: save detection counts
Is there a way to extract all detection events (for each detector individually) that occur during a sinter.Task/sinter.collect ...
2
votes
1
answer
620
views
What's hook error in surface code?
this line of c++ in surface code generation says:
// Define interaction orders so that hook errors run against the error grain instead of with it.
So how does the interaction orders in surface code ...
0
votes
1
answer
339
views
How to resolve ValueError: The circuit contains non-deterministic observables
I constructed a part of the syndrome measurement circuit as follows using Stim. However, when I run dem = circuit.detector_error_model() and ...
2
votes
1
answer
220
views
Are there qiskit or stim examples of how to decode a subsystem code
I can manage decoding a stabilizer code in qiskit and stim. I'd like to try a subsystem code next. For a stabilizer code, all stabilizers commute so simultaneous measurement of these produces ...
0
votes
1
answer
116
views
Differences in Simulating Syndrome Measurement Circuits with Prepared States : $|0_L \rangle$ vs $|0\rangle^{\otimes n}$
In the syndrome measurement circuit constructed using Stim, is there any difference between simulating with the data qubits prepared in the state $|0_L \rangle$ and simulating with data qubits ...
1
vote
1
answer
220
views
Modelling correlated measurement errors in Stim
Is there a way to model correlated measurement errors in Stim? I see we can implement correlated Pauli errors, but couldn't find anything for correlated measurement errors.
2
votes
1
answer
259
views
Two-qubit depolarizing error convention in Stim
In the definition of two-qubit depolarizing error in Stim, it is defined that operations such as $IX, XX, YI$ (excluding $II$) act with a probability of p/15, while $II$ acts with a probability of 1-p....
1
vote
1
answer
329
views
Simulating multiple logical qubits with stim
I'll first state the things I'm trying to do and then summarize my questions:
Since Stim takes a circuit-first approach, I think it should be possible to specify a Stim circuit that represents ...
0
votes
1
answer
197
views
Using Deterministic Errors in Stim Detector Circuit and decoding with Pymatching: X_ERROR(1) failing in PyMatching
the Question
Is there a standard way to use deterministic errors (so, for instance, X_ERROR(1)) in Stim with PyMatching? Currently, sometimes if I use ...
0
votes
2
answers
133
views
Why does the qubit give random results in the circuit with rearranged CNOTs for Steane's seven qubit code in Stim?
The following is a part of the syndrome measurement circuit for Steane's seven qubit code in Stim(For ease of viewing, the TICK is omitted.). Since we are considering the detection of X errors, we use ...
1
vote
1
answer
173
views
How to decompose errors given a DetectorErrorModel in Stim?
Suppose I'm presented with a detector error model (.dem) file that does not have its error mechanisms decomposed into edge-like error mechanisms (i.e. no ^'s appearing). Is there a way to apply the ...
2
votes
2
answers
303
views
A Simple way of Encoding qubit in Stabilizer Codes with Stim
In Stim, is there a easy way to encode qubits into a code state $| 0_L \rangle$ in stabilizer codes, other than constructing an encoding quantum circuit? For example, in Steane's seven-qubit code, can ...
0
votes
1
answer
253
views
Number of rounds of stabilizer measurements for a memory experiment in a stabilizer code and how to calculate the logical error rate?
I'm using stim with pymatching to simulate a memory experiment in a stabilizer code and am wondering how necessary using $3d$ rounds of stabilizer measurements is rather than $d$ rounds and also how ...
1
vote
1
answer
98
views
How to sample multiple groups of stim circuits in parallel with stim on linux?
I am performing many repetitions of a memory experiment in a stabilizer code using sinter to take many samples of different stim circuits. I am following the example in sinter's README file on how to ...
1
vote
1
answer
468
views
How to implement lattice surgery in stim?
Is there a circuit in stim that performs lattice surgery?
Was lattice surgery ever implemented in stim?
I wonder how the relevant detectors will look like - especially in the initial and final rounds ...
2
votes
1
answer
316
views
Stim: Peek (or Extract) Circuit Pauli Frame
I am testing a fault tolerant error correction scheme for a quantum error correcting code in the following way:
Construct my circuit (data and ancilla qubits)
Perform a round of error correction (set ...
0
votes
0
answers
278
views
How can I perform syndrome measurements for both X-type and Z-type stabilizers in Stim?
I would like to simulate the logical error rate of the surface code under depolarizing noise using Stim. The decoder I am using decodes from both X-type and Z-type stabilizer syndrome values. ...
0
votes
1
answer
156
views
Better way of using stim.TableauSimulator.measure_many to sample the code
I have a TableauSimulator initialised (which is a some 3D code) called TS. I am copying TS and then applying a set of Pauli Z-errors before using measure_many(*set_of_measured_qubits) to get syndromes ...
0
votes
1
answer
167
views
What is the Stim color_code:memory_xyz circuit executing?
In Stim's color_code:memory_xyz, the all data qubits are first initialized to the |0> state, then the Z-type stabilizer measurement circuit is executed, and ...
1
vote
1
answer
252
views
Implementing circuits with post-selection in Stim
I want to use Stim to calculate logical error rates with circuits that involve post-selection on measurement outcomes. Is it possible to do so with Stim and if yes, how do I go about it?
To provide ...
1
vote
1
answer
179
views
Is there a way to perform two simulations with the same noise in Stim?
I would like to calculate the logical error probabilities of surface codes under depolarizing noise using Stim. In doing so, if all data qubits are initialized to |0>, it is not possible to account ...
0
votes
1
answer
176
views
How can I determine if the error correction by estimated error results in a logical error in circuit-level noise?
I am trying to simulate the logical error probability of color code under circuit-level noise.
In the code capacity noise and the phenomenological noise, the Pauli errors to the data qubits that occur ...
0
votes
1
answer
440
views
How can I extract actual Pauli error in Stim?
I am using a quantum circuit simulator "Stim" to simulate the logical error probability of color code under circuit-level noise.
In the code capacity noise and the phenomenological noise, ...
0
votes
1
answer
320
views
OBSERVABLE_INCLUDE in STIM
I was going through the example_honeycomb_circuit.stim code available on page 17 of https://arxiv.org/pdf/2108.10457.pdf. I am curious about the rationale behind selecting the choice of rec[-k] for ...
5
votes
3
answers
582
views
Simulating stabilizer groups
Can any existing software be used (either directly or with a bit of persuading) to work with general stabilizer groups? From what I can see, tableau-based options like Stim and Qiskit can be used to ...
2
votes
2
answers
493
views
Simulating the surface code with stim: meaning of qubit coordinates
I would like to simulate the rotated surface code using stim for various code sizes. For my application, I would like to know where the stabilizers are located.
What is the meaning of the coordinates ...
1
vote
1
answer
452
views
Can Stim and PyMatching analyze logical error rate of non-deterministic observable?
In Stim, logical observable has to be deterministic. To calculate the logical error rate, we compare the actual_observables sampled with stim circuit and ...
1
vote
1
answer
90
views
Ground truth error corresponding to a particular sampling event
In stim we can use the .compile_detector_sampler().sample() to sample a detection event. However, there might be different ground truth errors that lead to the same detection event. Is there a way to ...
2
votes
1
answer
344
views
Does Stim support classical-bit controlled gates?
Does Stim support classical-bit controlled gates?
I want to apply a gate based on a certain measurement outcome, e.g. do Z^a on qubit B, where ...
1
vote
1
answer
135
views
max_shots and max_errors to reduce uncerainty in threshold curves with sinter / stim?
thanks for all your answers so far! I'm wondering, what do max_shots and max_errors mean (as in the code below) when sampling from a stabiliser circuit to produce threshold curves using stim? Would ...
0
votes
1
answer
134
views
Functionality of I and x^sweep gates in the code from the surface code implementation by Google
In the code availability by Google and implemented using Stim, they use I and x^sweep gates which I can't understand their use.
I suppose they are, somehow, used in the more sophisticated simulation ...
1
vote
1
answer
238
views
What does each "detslice-with-ops-svg" plot mean?
I created a distance-3 square surface code circuit, and below is the 'timeline-svg' diagram.
Since it would be easier to check where the detectors are detecting errors at each time slice, I use the '...
0
votes
1
answer
83
views
It seems a failure to track back error mechanism from DEM to circuit faults
This question is related to Within Stim, how to trace back DEM error instructions to Stim circuit faults.
I created a circuit of a distance-3 square surface code as you can see in the picture.
The ...
2
votes
1
answer
133
views
Does Stim support the Mølmer–Sørensen gate?
The Mølmer–Sørensen gate is a common ion trap gate. Does Stim support it? I tried MS 0 1 but it didn't work.
0
votes
1
answer
66
views
Stim's dem.diagram (detector error model diagram) not working for me?
I've copied these lines from Stim's Getting Started notebook:
...
0
votes
1
answer
189
views
Threshold value when simulating erasures with stim
Did anyone try to simulate erasures with stim and can tell me whether he achieved values that hold with the literature?
I tried an unrotated surface code with erasures at the data qubits ...
0
votes
1
answer
423
views
How is the match graph extracted from a stim.circuit.detector_error_model?
Let's say we have an error mechanism error(0.1) D7 D8 ^ D9 D10 ^ D13 D15. I understand that Stim is trying to decompose the complex errors into graphlike errors. It ...
5
votes
1
answer
891
views
How does Stim's detector sampler work?
I'm just getting started with Stim (and hence working through its Getting Started Notebook) and am wondering how the detector sampler actually works. The notebook states
A detector doesn't say ...
0
votes
1
answer
293
views
Circuit-based erasure simulation using stim
I want to simulate erasures in a surface code using stim, assuming that any gate on the data qubits can cause an erasure.
If I induce erasure after each gate by the method described in How do I ...
1
vote
1
answer
103
views
Using stim.TableauSimulator with python multiprocessing
I am trying to run some Monte-Carlo simulations whereby I have to call the TableauSimulator N times and use the measurement results to get an average. Is there any way to parallelise this loop? I am ...
0
votes
1
answer
468
views
Stim detector error model to syndrome graph
How can I convert a Stim detector error model into a networkx/rustworkx weighted graph representing the equivalent syndrome graph?
I want it to test a possible method to introduce erasures in the high ...
0
votes
1
answer
93
views
Stim: Surface code with manipulated data qubits
In stim, when we want to create surface code, we can simply do that:
...
3
votes
2
answers
413
views
Converting $T_1$ and $T_2$ decay rates to noise supported by stim
Stim only supports Pauli noises like DEPOLARIZE1, DEPOLARIZE2, X_ERROR, ...
1
vote
1
answer
264
views
stim : How to create a circuit like qiskit's c_if
In qikit, there is a circuit called c_if that feeds back to the quantum circuit according to the measured results.
https://qiskit.org/documentation/stable/0.39/stubs/qiskit.circuit.InstructionSet.c_if....
1
vote
1
answer
201
views
is it possible to use STIM for non-clifford circuits?
I know STIM is for clifford gate circuits but I wonder if there is a way around this? Is it possible to use STIM for non clifford circuits? Do we have any example for it?