In Improved Simulation of Stabilizer Circuits by Aaronson and Gottesman, it is explained how to compute a table describing which Pauli tensor products the X and Z observable of each qubit get mapped to as a Clifford circuit acts upon them.
Here as an example Clifford circuit:
0: -------@-----------X---
| |
1: ---@---|---@---@---@---
| | | |
2: ---|---|---@---|-------
| | |
3: ---@---@-------Y-------
And the table describing how it acts on the X and Z observables of each qubit:
+---------------------+-
| 0 1 2 3 |
+------+---------------------+-
| 0 | XZ X_ __ Z_ |
| 1 | ZZ YZ Z_ ZZ |
| 2 | __ Z_ XZ __ |
| 3 | Z_ X_ __ XZ |
+------+---------------------+-
| sign | ++ ++ ++ ++ |
+------+---------------------+-
Each column of the table describes how the circuit acts on the X observable (left half of column) and Z observable (right half of column) of each qubit. For example, the left side of column 3 is Z,Z,_,X meaning an X3 operation (Pauli X on qubit 3) at the right hand side of the circuit is equivalent to a Z1 * Z2 * X4 operation at the left hand side of the circuit. The 'sign' row indicates the sign of the product, which is important if you're going to simulate a measurement (it tells you whether or not to invert the result).
You can also compute the table for the inverse of a circuit. In the example case I've given, the inverse table is this:
+---------------------+-
| 0 1 2 3 |
+------+---------------------+-
| 0 | XZ Y_ __ Z_ |
| 1 | _Z YZ Z_ _Z |
| 2 | __ Z_ XZ __ |
| 3 | Z_ Y_ __ XZ |
+------+---------------------+-
| sign | ++ -+ ++ ++ |
+------+---------------------+-
The tables look almost the same if you transpose their rows and columns. But the entries aren't exactly identical. In addition to transposing, you have to encode the letters into bits (_=00, X=01, Z=10, Y=11) then swap the middle bits then decode. For example, ZZ encodes into 1010 which swaps into 1100 which decodes into Y_.
The question I have is: is there also a simple rule for the computing the inverse table's signs?
Currently I'm inverting these tables by decomposing them into circuits, inverting the circuits, then multiplying them back together. It's extremely inefficient compared to transpose+replace, but if I'm going to use transpose+replace I need a sign rule.