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 multiple logical qubits. More specifically, rather than simulating a memory experiment with a single logical qubit, I would like to simulate a memory experiment with an arbitrary number of logical qubits (the motivation of doing this is a longer conversation but this experiment will be the starting point of my study).
My questions:
- How would the detector annotations work? I understand how they work for a single logical qubit, but when the circuit has multiple logical qubits, would it be enough to just specify sets of measurements that must be consistent for every logical qubit?
- For the logical observable (using the
OBSERVABLE_INCLUDE
instruction), how can I specify the observables for every logical qubit? - How would this work with the pymatching decoder? Rather, how do I pass the syndromes generated by this circuit to a decoder? Having information of multiple logical qubits would mean that the decoding would be independent for every logical qubit and so a different logical error rate would be reported for every logical qubit.
Hopefully my problem and questions are clear enough, I'll be happy to edit my post in case further clarifications are needed. Thanks!