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 explanations on this site (thank you users Craig Gidney and "control freak"), I'm struggling to correctly implement lattice surgery in STIM. Mostly, this is because of the complexity and finickiness of implementing the merge and split operations and ensuring I introduce/remove detectors appropriately. It does not help that I am new to QEC either. What I'm looking for seems to be a fairly textbook situation - which is why I hope there's open source code out there (or perhaps a very detailed step-by-step explanation).
Ideally, I'd like to use code to modify the error rates of seam operations to understand how that affects (for example) logical qubit teleportation using lattice surgery.
Thank you.