Let's say we have a list of stabilizers: {'YZY*', 'XYY*', 'YZYZ', 'Z*Z*', '*XZ*', 'XZX*', 'ZX*Z', 'XZXZ', 'YYX*', 'Z*ZZ'}. Is there any existed formula or function (eg. in qiskit) that can calculate its generators?
1 Answer
The way that I'd do it is to write out the stabilizers in a $10\times 8$ matrix in this case (number of rows= number of stabilizers, number of columns is double the number of qubits). For each row, take a stabilizer and write out, for the first 4 columns, if there's an $X$ on a given qubit, and in the last 4 columns, if there's a $Z$ on a given qubit (remember, $Y$ contains both $X$ and $Z$).
Then, I'd simply run row reduction on my matrix (modulo 2). I don't know how to do this in qiskit, but Mathematica has the handy function RowReduce that can work modulo 2.
In essence, you're running Gram-Schmidt asking if each stabilizer in turn can be created as a product of the stabilizers already in your set.
-
$\begingroup$ Thanks! I used your method and did the RowReduce. I got a matrix: $\endgroup$ May 17, 2021 at 14:20
-
$\begingroup$ Yes, you should have a matrix that specifies the (max) 4 stabilizers that generate the given stabilizers. (Note that the result is non-unique). $\endgroup$ May 17, 2021 at 14:38
-
$\begingroup$ Thanks! Here is the matrix that I got {{1,0,1,0,0,1,0,0},{0,1,0,0,0,0,0,0},{0,0,0,0,1,0,0,0},{0,0,0,0,0,0,1,0},{0,0,0,0,0,0,0,1},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}} It has 5 terms that contain non-zero entry. In my understanding, they correspond to 5 generators: XZXI, IXII, ZIII, IIZI, IIIZ. . But you said the maximum number is 4, right? How can I eliminate them? $\endgroup$ May 17, 2021 at 15:03
-
$\begingroup$ Some of those don't commute. That suggests either your initial "stabilizers" don't commute with each other, or you've made a typo in entering the matrix. $\endgroup$ May 17, 2021 at 15:06
-
$\begingroup$ I got the answer {{1, 0, 1, 0, 0, 1, 0, 0}, {0, 1, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 1, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0}}. $\endgroup$ May 17, 2021 at 15:10