I want to use Stim to calculate logical error rates with circuits that involve post-selection on measurement outcomes. Is it possible to do so with Stim and if yes, how do I go about it?
To provide context, I want to calculate thresholds for codes where syndrome measurement, and logical gate, circuits involve entanglement purification. An example of such a circuit is found in Nickerson, et al. Freely Scalable Quantum Technologies Using Cells of 5-to-50 Qubits with Very Lossy and Noisy Photonic Links. Phys. Rev. X 4, 041041 (2014). Open access: preprint.
Nickerson et al. implement surface code stabilizer measurements by using a purified GHZ state as a resource state. In the image below, schematic (a) shows the usual surface code stabilizer measurement circuit and schematic (b) shows the GHZ state-based approach.
Construction of the purified GHZ state involves post-selection, as shown in the schematic below,
(All images in this post are from Nickerson, et al. Freely Scalable Quantum Technologies Using Cells of 5-to-50 Qubits with Very Lossy and Noisy Photonic Links. Phys. Rev. X 4, 041041 (2014).)

