Questions tagged [stim]
For questions about Stim, the open source tool for high-performance simulation of quantum stabilizer circuits.
82
questions
0
votes
1
answer
13
views
Stim: Surface code with manipulated data qubits
In stim, when we want to create surface code, we can simply do that:
...
2
votes
1
answer
66
views
Converting T1 and T2 decay rates to noises supported by Stim
Stim only supports Pauli noises like DEPOLARIZE1, DEPOLARIZE2, X_ERROR, Z_ERROR. Given T1, T2 values of qubits, how would I adjust a Stim circuit file to reflect these? For instance, we might have ...
1
vote
1
answer
90
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
0
answers
19
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?
1
vote
1
answer
29
views
Description of the internal decoders of" sinter"
Can anyone explain me what are the "internal decoders" of sinter? What is their decoding method, complexity, advantages, etc.? Is one of the decoders available with sinter better for ...
2
votes
1
answer
33
views
How to enable ignore_decomposition_failures in sinter.collect()?
I am using stim and sinter to compute the logical error rate of a QEC code.
For the code I am testing, calling the function sinter.collect() triggers the following ...
0
votes
1
answer
104
views
Estimate of threshold values for 7-qubit Steane code with qiskit (or stim)
I have trouble recreating the graphs shown in this paper
https://arxiv.org/pdf/quant-ph/0508176.pdf
i.e. the quadratic trend of the logical error against physical single qubit error for [7,1,3] code
I ...
0
votes
1
answer
36
views
Indeterministic final measurements simulating quantum torus code in Stim
I am trying to simulate the quantum torus code in Stim but have indeterministic errors when I do the final measurements and compare data qubits with respective previous syndrome qubit measurements.
I ...
0
votes
1
answer
30
views
Using sinter to collect error rates of multiple observables
I have a stim circuit with 2 observables. When I simulate this I would like to know how many times the decoder predicts:
the value of the first observable incorrectly
the value of the second ...
1
vote
1
answer
32
views
Using PyMatching for CSS code with more than two Stabilizers per qubit
I am implementing QEC cycles for CSS codes and using PyMatching for decoding. Since I can quickly obtain the parity-check matrix, PyMatching is convenient. However, when I try to use it for CSS codes ...
4
votes
1
answer
34
views
Computing amplitude of a Clifford circuit in stim
Using Stim, is there an efficient way to evaluate a particular amplitude, i.e. $\langle 0|U|0\rangle$ (including the phase), where U is a circuit of Clifford gates?
0
votes
1
answer
38
views
Pass stim flags to sinter
While using stim (in python) to build detector error models it is possible to pass flags such as ignore_decomposition_failures=True etc.
How can I pass such flags ...
0
votes
1
answer
47
views
Issues measuring x-stabilizers in the first round of a z focused stim surface code
I'm trying to create a custom stim surface code circuit where I measure both x and z stabilizers each round. This is different from the default stim surface code circuits since the default circuits ...
1
vote
1
answer
65
views
Unrotated memory X Generated Code
I am wondering what the details of the unrotated memory x code available as a generated code in stim are. What does the 'memory X' refer to, and are the boundary conditions periodic?
1
vote
0
answers
19
views
Convert DetAnnotation in a loop with `stimcirq`
Is there any workaround to convert the DetAnnotation in a cirq repetition block to the detector in the stim repeat block?
It ...
0
votes
1
answer
27
views
Convert cirq circuit to stim cirq in a compact style
If I have a cirq.Circuit as follows:
a, b, c = cirq.LineQubit.range(3)
circuit = cirq.Circuit(
cirq.X(a),
cirq.Y(b),
cirq.X(c),
)
I use ...
1
vote
1
answer
106
views
Does Stim work if some syndromes are only measured every 2 rounds?
I am interested in translating something to Stim so that it can run faster. The QEC code that I am trying to implement includes some syndromes that are only measured every 2 rounds. They are obtained ...
1
vote
1
answer
49
views
Integrating an arbitrary decoder into the stim framework
I am currently trying to use stim to evaluate the performance of decoders other than the ones that are inbuilt into the framework (mwpm and fusion-blossom). I need to get the logical error -rate of ...
1
vote
1
answer
68
views
How to interface stim to a generic qiskit decoder?
I can generate encoder/decoder circuits for arbitrary QECC in qiskit. I tested a number of codes : $[[5,1,3]], [[7,1,3]],[[8,3,3]],\cdots$ and everything seems to work fine. The problem is that the ...
2
votes
1
answer
59
views
PyMatching.Matching.decode() returns incorrectly sized array
I have having trouble getting the decode(...) function for a pymatching.Matching object to return an array of an appropriate ...
1
vote
1
answer
41
views
stim match graph of circuit with distance 3 only has one node
I have a stim circuit and when I call shortest graphlike error I find that it has distance 3:
assert len(shortsurfacecode.circ.shortest_graphlike_error()) == 3
When ...
1
vote
1
answer
34
views
Can STIM be used to numerically find all the stabilisers of a model?
Can the package stim be used to exhaustively find all the stabilisers of a model? If so, how? I have a gauge code I am studying and we're unsure if we've found all the stabilisers or only a subset.
0
votes
1
answer
40
views
How to use MPP to measure the logical Z in stim
I'm trying to simulate 3 qubit (distance 3) bit-flip code in stim.
I wrote code similar to How to import a generic stabilizer code in stim using MPP operation. I found the following way yields logical ...
0
votes
0
answers
44
views
How to simulate pseudothreshold of surface code?
I would like to simulate the pseudothreshold of a surface code. I want to write code which is as low in abstraction as possible, to learn better. So, as a first attempt, I would like to avoid using ...
1
vote
1
answer
83
views
Using Stim and PyMatching for circuit level noise simulation
A common practice for simulating CSS code is to only apply the decoder for logical X (or Z) errors. Stim includes example circuits (from stim.Circuit.generated) for "surface_code:...
4
votes
1
answer
148
views
How to simulate rectangular surface code with stim?
The Stim package is a tool for simulation and analysis of quantum stabilizer circuits. Stim's built-in surface code circuit generation, stim.Circuit.generated, can run different code tasks (rotated ...
3
votes
1
answer
271
views
is cirq suitable for simulation of quantum error correction?
I experimented with stim and qiskit for QECC simulations. They both have limitations : for example stim has no support for non-clifford operations (qiskit does); qiskit has no support for multiple ...
0
votes
1
answer
151
views
qiskit : how to measure multiple pauli strings
This seems like a basic operation, but I can't see how it's done in qiskit.
The solution here
Measuring tensor products of Pauli operators doesn't work anymore.
I get an error "qiskit has no ...
1
vote
1
answer
59
views
Seeding a stim.TableauSimulator
When creating a sampler from a stim.Circuit (say, for example, using stim.Circuit.compile_sampler), one can provide a ...
1
vote
3
answers
134
views
how to apply pauli string depending on multiple control qubits (qiskit or stim)
I read and re-read the documentation for MCMT and MCX and still can't figure out how to do this.
For example I have 10 qubits $q_0,\cdots q_9$; I want to apply pauli string $X_2 Y_4 Z_5$ with control ...
2
votes
1
answer
115
views
QecSim vs Stim for simulating QEC
I am starting a quantum error correction (QEC) project and I would like to invest some time at the outset familiarizing myself with a nice software library that can be used to simulate different codes....
1
vote
1
answer
135
views
Given a list of stabilizers (or parity check matrix), find an encoding circuit
I am trying to study Quantum LDPC code and have generated the A matrix by taking the hypergraph product of a classical LDPC code. Now my aim is to study those matrices by implementing the same on ...
0
votes
1
answer
86
views
How to compute projective probabilities of a given measurement outcome using Stim?
I am looking to calculate the projective probabilities for each measurement outcome in a Clifford circuit and then output its corresponding tableau state. I am performing the measurement in the Z ...
2
votes
1
answer
66
views
OpenQASM circuits in Stim
I would like to run circuits saved as OpenQASM circuits in Stim. Does anyone know how to import these circuits from OpenQASM to Stim?
Many thanks.
0
votes
1
answer
58
views
Exact Probabilities of Outcomes for Clifford Circuits with Mid-Circuit Measurements Using Stim
I am trying to find the exact probabilities of specific measurement outcomes for Clifford circuits with mid-circuit measurements. Essentially, I am looking for a function that takes an arbitrary ...
1
vote
1
answer
159
views
stim: how to control sign of syndrome measurements
I have a circuit that encodes the $[[5,1,3]]$ code, adds noise on one of the qubits and then measures the syndrome on 4 ancilla qubits :
...
1
vote
1
answer
93
views
How to include stabilizer mixed states (maximally mixed state) in Stim
According to Gottesman's paper https://arxiv.org/abs/quant-ph/0406196, the maximally mixed state is also simulable by stabilizers. Is there any way to include this kind of state in Stim?
1
vote
1
answer
103
views
How to convert Tableau to Circuit in stim
I am trying to simulate random Clifford circuit. I can use stim.Tableau.random(n) to generate it, but don't know how to convert into stim.Circuit() form. It seems current v1.9 does not have to_circuit(...
2
votes
1
answer
69
views
Stim: How are the signs in tableau calculated and how to force them to +
I'd like to understand how the signs in the tableau are calculated and if there's a way to force them to be +. Here's an example that shows what I see : (this is an encoder for $[[8,3,3]]$ code)
...
0
votes
1
answer
37
views
Stim : How to use gates multiplied by a constant or how to convert between Y and XZ
The usual convention is that $Y=\imath XZ$ let's call that the "complex" $Y$ convention; for a number of reasons I prefer to work with $Y=XZ$, the "real" $Y$ convention. Stim works ...
1
vote
1
answer
75
views
How to train neural network decoder with stim?
Following Decoding Small Surface Codes with Feedforward Neural Networks, I am trying to train a similar neural network decoder with stim.
Decoding is reduced to a ...
3
votes
1
answer
84
views
How can I decide ahead of time whether a Stim detector will be deterministic?
I have a high-level description of a quantum stabiliser code and a small brain, and I'd like to write code to compile the former to a Stim circuit. The high-level description contains the stabiliser ...
1
vote
1
answer
123
views
how to go from matrix to tableau to circuit in qiskit or stim
I'm working with QECC using a non-python based platform. I'd like to move the results into python to do calculations that are better handled by packages like qiskit or stim. So the output of the non-...
1
vote
1
answer
91
views
Support for Qubit Leakage Errors in Stim
If I were interested in modeling qubit leakage errors using stim, how should I go about this? There are two scenarios of interest:
Any leaked population can be treated as lost, until I reset the ...
2
votes
1
answer
183
views
Finding all possible n-qubit Clifford gates (for n<5) in stim
Within stim stim.Tableau.random(n) returns a random sample from $n$-qubit Clifford group using algorithm described here https://arxiv.org/pdf/2003.09412.pdf. Is ...
0
votes
1
answer
48
views
How to get a corresponding unitary matrix from a tableau in stim?
The following code
import stim
stim.Tableau.from_named_gate("CNOT").to_unitary_matrix(endian='big')
outputs
...
1
vote
1
answer
120
views
How to convert tableau representation of random clifford gate into its matrix representation using stim?
I am currently trying to benchmark my code with a Haar circuit and I require to sample clifford gates in matrix form. I know a function "stim.Tableau.random(n)" which does that and gives me ...
2
votes
1
answer
60
views
Options for more complex error models on stim?
We're trying to simulate whether some initialization strings are preferable to others. For example, would initializing all qubits to $|0\rangle$ lead to a lower error rate?
Is it possible to further ...
0
votes
1
answer
65
views
Modifying stim simulator state by resetting the current inverse tableau not working as desired?
My goal is to run the Clifford simulation in stim where I apply Clifford gates (not neccesarily listed in the “named gates” list) e.g., random 2-qubit Clifford gates with tableau given by stim.Tableau....
2
votes
1
answer
88
views
Read/Write circuit to file in Stim
I'm trying to save and load large circuits from files in Stim. For example, if I use a generated surface code from the intro notebook
...