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 and unrotated surface codes for X and Z error probabilities for example) and takes as parameter the "desired code distance of the generated circuit". Is it possible to give two distances $d_X$ and $d_Z$ for rectangular surface codes ?
stim.Circuit.generated method doesn't support rectangular surface codes (this method is only meant to generate some common example circuits to get going, rather than all possible variants of surface code circuits). However, I also wanted to make some small tweaks to these example circuits recently, so I translated the surface code circuits from C++ to Python so that I could change them without needing to use the Stim C++ API. I've open sourced the code, so feel free to use it and make the necessary tweaks for generating rectangular surface codes: https://github.com/oscarhiggott/StimCircuits