Given that
is equivalent to
I am interested into not performing the last CNOT. Rather, I want to keep track of the error I intentionally introduced by removing it.
I am trying to do this by means of auxilliary qubits.
Intuitively, I may do this by means of the following protocol:
However, this doesn't seem to me as it does the right correction.
On contrary, I found that the following protocol gives the right density matrix:
Here I just removed what it was supposed to be a $Z$ correction. I don't get why it is not necessary (or maybe I am just using quirk's tools wrong).