So far, I have used surface codes on Stim simulations only. The simulation is for a surface code and I want to understand how surface codes work when I comes to quantum circuit. How is this done for a full quantum circuit with multiple qubits and gates? How are the qubits encoded? Where is the QECC circuit placed? When are the errors corrected? How are the rounds increased? Do all qubits need to have the same distance surface code? Can someone refer me to some papers or articles related to this?
Lastly, is there anyway of simulating this? For example: can I use STIM to simulate surface codes on an entire circuit? If yes, how? If not, can someone suggest a doable idea?