Questions tagged [stim]
For questions about Stim, the open source tool for high-performance simulation of quantum stabilizer circuits.
278 questions
0
votes
0
answers
11
views
What is stim and what are its use
What exactly is this stim? https://github.com/quantumlib/Stim?tab=readme-ov-file#what-is-stim
It would be really great if someone can explain about ...
1
vote
1
answer
76
views
How to obtain the set of stabilizer generator of a code, from stabilizer of its circuit tableau simulation
What is the relationship between the stabilizer generator of a quantum stabilizer code, and the stabilizer generator of its circuit tableau? I notice some difference for cases.
I use Stim to simulate ...
1
vote
1
answer
54
views
n-Qubit depolarizing errors/pauli channels in stim circuits and approximate disjoint errors in the respective detector error model
Because it is not (yet?) available natively, I am currently implementing a $n$-qubit depolarizing error in stim using
...
2
votes
2
answers
108
views
logical error probability independent from distance in STIM default repetition code
I am testing the STIM's default implementation of repetition code with different values for the distance and rounds. It seems to me the logical error rate is independent from the distance, which I did ...
3
votes
1
answer
65
views
Understand which measurements is a detector looking at in Stim
In stim, I normally define detectors as DETECTOR rec[-1] rec[-2]. In the timeline plot, ...
2
votes
1
answer
47
views
Can Stim tell what to measure to get a certain stabilizer group?
In Stim, given a stabilizer group $S_1$, is there a way to find a set of measurement that we should perform to move to another stabilizer group $S_2$? For example, suppose we have a 5-qubit code state,...
3
votes
1
answer
87
views
Does the syndrome extraction circuit determine the threshold for the surface code?
The examples of the surface code threshold in Stim all use an optimal syndrome extraction circuit. These measure the CNOT gates in an N or Z pattern and this is known to be fault tolerant.
Suppose I ...
1
vote
1
answer
71
views
Is there a way to calculate the distance of a stabilizer code with multiple logical qubits in Stim?
I am wondering if there is a way to calculate the distance of a stabilizer code given stabilizer generators. Especially, I want to calculate the distance of a code with multiple logical qubits, i.e., $...
2
votes
1
answer
61
views
Coherent Noise channel options in stim?
What coherent noise channels can I apply on 2-qubit gates in stim? I believe that DEPOLARIZE is completely incoherent. I think I can use the ...
1
vote
1
answer
61
views
reference sample section of the measurement part in Stim
I am very interested in the reference sample section of the measurement part in Stim, so I looked up the relevant code in Stim and displayed the relevant content in class. stim in Stim/doc/python'...
0
votes
1
answer
34
views
shot=1 and reference sample in stim
I have seen relevant question and answer about"shot=1",I find the answer "Making a stim.TableauSimulator and running the circuit once is cheaper than compiling a sampler and taking only ...
0
votes
1
answer
49
views
the output of Stim
As a beginner in Stim, it may be because I am not clear enough about the context, and I am not sure what content Stim can output? Perhaps it is because there are indeed a wide range of things it can ...
-1
votes
1
answer
61
views
How to introduce error to the stim circuit exported from Crumble
I am not successful to add a noise model to the circuit that I created in Crumble and transferred into STIM with stim.Circuit(''' .... '''), without adding them by hand.
I see the examples of stim....
0
votes
0
answers
80
views
Simulating BB codes in STIM
Page 3 of the supplementary information of High-threshold and low-overhead fault-tolerant quantum memory (Nature, 2024) gives an algorithm for the syndrome measurements of arbitrary BB codes. I'm ...
1
vote
2
answers
177
views
Understanding detectors in stim
I'm getting started with STIM but I'm struggling with the interpretation of detectors. For example take the following circuit
The "getting started" jupyter notebook says
A slightly subtle ...
0
votes
1
answer
66
views
Can I run stim on GPU?
I'm trying to run multiple simulations of a stim circuit, in parallel. I am using Cupy to transfer the data to the GPU device but I get errors which because I think I can't run these simulations on ...
0
votes
1
answer
58
views
Why does this stabilizer flow hold?
I am reading https://arxiv.org/pdf/2302.02192 by Gidney and it shows how to construct stabilizer flow diagrams. See the following diagram (figure from Appendix A)
The claim here is that qubit s is ...
1
vote
1
answer
77
views
Circuit-level noise and decoding graphs
I'd like to check if my understanding is correct.
Given $n$ rounds of some syndrome extraction circuit that are performed consecutively, building a decoder for circuit-level noise involves the ...
0
votes
0
answers
88
views
before_round_data_depolarization in Stim surface code circuits
I am working with Stim to do some circuit-level noise simulations and I have a doubt on the noise model and the stim implementation. I can generate stim circuits for the surface code using the ...
2
votes
1
answer
181
views
Measurement and comparison of logical observable parity with stabilizer parity in stim
I've begun going throught stim, and part of the getting started notebook is confusing me.
The first issue I am having is w.r.t the logical observable. In the notebook, it refers to the leftmost qubit ...
1
vote
1
answer
74
views
Measurement of a surface code patch - how many detectors in Stim after the final round?
I am looking at the Stim code for a surface code patch after the final measurement. This usually has a detector that looks at multiple elements. I am struggling to understand which elements should be ...
1
vote
1
answer
76
views
Does the noise model in the built-in surface-code circuit in Stim correspond to circuit-level noise?
In Stim, there is a built-in surface code circuit like this:
...
1
vote
1
answer
48
views
Forward propagate an error in Stim
The method Circuit.explain_detector_error_model_errors() allows one to check which errors result in certain detector flips and logical flips.
Is the reverse process ...
1
vote
1
answer
44
views
Select different error channel and reformulate the weight of error mechanism based on the measurement results
In stim:
Can I select a different error channel based on the measurement results of heralded erasure errors?
For example:
...
2
votes
1
answer
125
views
Simulating a full Y or T factory under circuit level noise - figure of merits?
I have written some code that can simulate the logical circuits corresponding to a full T (or Y) factory under circuit level noise in Stim, emulating a memory type experiment with surface code patches....
0
votes
1
answer
39
views
Why doesn't `PAULI_CHANNEL_1` require approximation in Stim sometimes?
There are circuits in which PAULI_CHANNEL_1 doesn't require approximation given certain probabilities (seems like probabilities below ...
0
votes
0
answers
67
views
Simulating error correction of multiple commuting logical operators with stim and pymatching
I'm trying to simulate error correction with the Floquet Color Code. On the torus, this code has two logical qubits. For efficiency, I'm want to simulate two commuting logical operators at the same ...
2
votes
2
answers
112
views
Efficiently decomposing `SQRT_ZZ` into dissipative gates
The following stim circuit is equivalent to SQRT_ZZ 0 1, up to pauli feedback, while using only gates from the set MX, ...
1
vote
1
answer
92
views
What is the right way to do Stim/sinter simulations using an HPC cluster?
I believe that if using sinter.collect to simulate an error correction circuit in Stim, setting the number of tasks is not sufficient to fully take advantage of a ...
1
vote
1
answer
56
views
Computing pseudo-threshold with sinter and stim
I've been using stim and sinter to test some codes I've been developing. Is there a built in sinter method for approximating the pseudothreshold? I could fit a curve to my data and find where it ...
0
votes
1
answer
56
views
How do errors affect gauge detectors in detector error models?
I'm trying to build a detector error model with Stim for a circuit that contains gauge detectors, and I don't quite understand the logic of how errors affect gauge detectors.
My expectation was that ...
1
vote
0
answers
29
views
Get output probability of a qubit given measurement result of other qubits on Stim
I am doing experiments about Clifford circuits using Stim: a fast stabilizer circuit simulator. For a n-qubit Clifford circuit, I want to get the output probability of q_n given the measurement result ...
0
votes
0
answers
51
views
Why Sinter is using so much memory? Is there a way to reduce it?
I am using Sinter to sample STIM circuit of a big Hypergraph product code [[1800,98,10]]. The machine I am using has 128GB ram and 32 CPU cores. Sinter is eating up huge memory and it crashes in a ...
0
votes
0
answers
43
views
Resource Estimation with Stim
To implement the Splitting method in an architecture using Stim and PyMatching for resource estimation at low error rates ( $10^{-6}$ ), where Monte Carlo simulation is ineffective, I recently found a ...
4
votes
1
answer
91
views
Given a stabilizer state, check if all k qubit subsets are maximally mixed
Problem
I’m checking if all k-qubit subsets of a n-qubit stabilizer state are maximally mixed.
Approach that works, but is slow
The following approach works. But it's numerically painful, so I'm ...
1
vote
1
answer
132
views
Open-source code for Lattice Surgery in STIM
I'm looking for open-source code that implements lattice surgery merging and splitting between two rotated surface code logical qubits in STIM (for d=3 or above).
Whilst there are some excellent ...
0
votes
1
answer
75
views
generating pure errors (destabilizers) by given stabilizer and logical group
Suppose we have a stabilizer code on n physical qubits, with stabilizer group S and assume fixed representatives of the logical operators L. Given this fixed set of generators for S and L, can we ...
0
votes
1
answer
98
views
`predictions` and `fault_ids` in Stim and PyMatching for surface code decoding
When I tried to use Stim and PyMatching to decode errors in a Rotated Planar code, I noticed that, Regardedless of the code distance, predictions.shape, as well as ...
0
votes
1
answer
58
views
Effect of rounds in surface-code simulation with Stim
I'm learning Stim with the official tutorial and have a question.
I made a small program:
...
1
vote
1
answer
109
views
Projection and inner products in stim [duplicate]
In Stim, is it possible to compute the inner product $\langle\phi|\psi\rangle$ of two stabiliser states $|\phi\rangle$ and $|\psi\rangle$? It seems like this should be possible, since an algorithm to ...
1
vote
1
answer
78
views
How to find the undetected errors for general stabilizer codes in Stim?
In Stim, we use the detectors to track syndrome flips and infer the error pattern. However, the syndrome stays the same if the actual error pattern is a logical operator of the code by coincidence. It'...
1
vote
1
answer
117
views
How does OBSERVABLE_INCLUDE work?
I am trying to simulate the Steane code with circuit level noise using stim. I would like to use pymatching to correct errors. My circuit has detectors but does not include any logical observables to ...
0
votes
1
answer
101
views
What does DETECTORs mean in the example circuit for rotated surface code in Stim?
In Stim, an example circuit for rotated surface code is provided:
...
0
votes
1
answer
55
views
What is the easiest way to get path graph from Stim?
In Stim, we can get a detector graph with the probability of each error mechanism occurring. Now I want to construct a path graph from the detector graph, which is usually done by Dijkstra's algorithm....
1
vote
1
answer
68
views
Stim - Adding gates to the start of the circuit
Say I have
circ = stim.Circuit()
circ.append("CX", [0,1])
Now, I want to add a Hadamard to the beginning of the circuit. My current method entails ...
1
vote
1
answer
131
views
How to implement circuit-level noise model?
I am currently trying to implement circuit-level noise on some quantum codes. Right now, I can encode the logical qubit by projecting the physical qubits into a +/-1 eigenstate of all the stabilizers ...
0
votes
1
answer
70
views
Can a stabilizer tableau with a single row be updated?
The context for this problem is that I wish to know how logical operators evolve over a circuit that is composed of Clifford gates and single qubit measurements. Note that the measurements may be mid-...
0
votes
0
answers
87
views
What sinter.plot_error_rate is actually doing with the data?
I don't quite understand what the **sinter.plot_error_rate** function is actually doing. From looking at the code, it seems to perform some kind of binomial fit. I'...
0
votes
0
answers
62
views
detector_error_model with stim
The following code is a simple repetition code (for two qubits and one ancilla) for detecting Z errors:
...
0
votes
1
answer
71
views
Obtaining and Applying XX and ZZ Parity in Stim for Controlled Paulis
I am attempting to perform a CNOT between two surface code qubits in Stim, based on this paper by Daniel Litinski and Felix von Oppen.
The CNOT they perform is shown in the figure below (Figure 3 from ...