9

I'm looking for fast code, or a fast algorithm, for checking if a given state vector $A$ can be transformed into another state vector $B$ using only the Pauli operations $X$, $Y$, $Z$.

The naive strategy is to simply iterate through all $4^n$ ways to apply a Pauli operation (or no operation) to each of the $n$ qubits, actually simulate applying the operations ($2^n$ cost for each qubit for each case) to one of the states, and check if the resulting state vector is equivalent to the other state. Surely it's possible to do this in better than worst case $n 8^n$ time?

[Update] I am specifically interested in worst case performance. Heuristics are interesting and useful answers, but won't become the accepted answer.

Craig Gidney
  • 47,099
  • 1
  • 44
  • 119

2 Answers2

2

The way that I thought to start was to look at the reduced density matrices of the individual qubits. If they cannot be interconverted using Pauli matrices, then the whole thing can't.

The only problem is that this idea breaks down as soon any of the reduced density matrices are maximally mixed. At that point, you could ask "are the two states equivalent under local unitaries?". If you derive the unitaries as a result of that question, then it's easy to test if they're Pauli or not. This was studied here. I think there are still cases where the scaling is problematic, but I don't remember the bit with maximally mixed reduced density matrices well enough.

DaftWullie
  • 63,351
  • 4
  • 57
  • 142
2

Pick an element $a_i$ of A and find its position in B, disregarding changes in phase. The shift in position uniquely identifies the series of $X$ or $Y$ applications needed for the transformation.

The relative phase of $(a_0, b_0)$ tells you, in steps of $-i$ rotations, how many $Y$ gates you need for the transformation. The relative phase of $(a_1,b_1)$ to $(a_0,b_0)$ tells you have many $Y$ or $Z$ gates act on the first qubit; and so on for the relative phase of $(a_{2^{k-1}},b_{2^{k-1}})$ to $(a_0,b_0)$ for $Y$ or $Z$ gates acting on qubit $k$.

If $a_i$ does not appear in B then the transformation is not possible.

I believe the above can be done in $O(n)$-sh.

Eelvex
  • 261
  • 1
  • 7