Hi again Paweł, I realized that `substutited` *returns* a new builder, and does not change it in-place. The docs of `magnetic_gauge` were misleading there.
You can simply replace ``` l_lead = l_lead.substituted(peierls='peierls_llead') ... r_lead = r_lead.substituted(peierls='peierls_llead') ``` in your code, and should work.