In stim, when we want to create surface code, we can simply do that:

surface_code_circuit = stim.Circuit.generated(

However, I first want to rotate all the data qubits and then I want to create surface code with these rotated data qubits. Is it possible to do that with STIM? IF yes, how can I do that?


1 Answer 1


Stim's example circuit generation is intentionally extremely limited. It would basically be impossible to support all the different things that users would want a surface code circuit to do. So the intended usage is that people use the example circuits to get oriented, and then make their own circuits with the specific thing that they need.

If you want custom surface code circuits with special behaviors, you have to make them for yourself.

That said, there does exist code on github using stim to make surface code circuits. You could potentially use it as a jumping off point.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.