quantumlib / Stim

A fast stabilizer circuit library.
Apache License 2.0
305 stars 88 forks source link

PauliString.before/after take measurement indices #752

Open mmcewen-g opened 2 months ago

mmcewen-g commented 2 months ago

Currently PauliString.before and PauliString.after are only implemented for measurement-less circuits

It would be nice to add another overload letting us provide it with appropriate measurement indices, so we can project pauli strings through QEC circuits e.g. stim.PauliString("ZZ").after(stim.Circuit("M 0"), measurement_indices=[-1]) == stim.PauliString("_Z")