# How to calculate the generators of a list of stabilizer?

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?

• Note that there isn't a single set of generators. It is rather like giving a basis for a subspace ... there are many equivalent ones. May 17 '21 at 11:09

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$$).