# What are the logical 0 & 1 states for the 17 qubit (9 data qubit) surface code?

What are the logical 1 and logical 0 states for the 17 qubit (9 data qubit ) surface code given stabilixzers below ?

I have read there is an algorithm that calculates the logical 0 and 1 states given the stabilizers . Any more info on this ?

The logical $$|0\rangle_L$$-state is created by initialising all data qubits in the $$|0\rangle$$-state, running all stabiliser circuits, and measuring all 8 stabilisers. You will end up in a random state, of which there are exponentially many, that respects the symmetries of the stabilisers. The $$Z$$-stabilisers measurement outcomes should all read 0, while the $$X$$-stabilisers all have a 50-50 probability of being measured as either 0 or 1.
The logical $$|1\rangle_L$$-state is created by applying the logical $$X_L$$ operator to the logical $$|0\rangle_L$$-state, in this case: $$|1\rangle_L=X_L|0\rangle_L =X_2X_4X_6|0\rangle_L$$. Note that initialising all data qubits in the $$|1\rangle$$-state and running the stabiliser circuits does NOT guarantee that you end up in the logical $$|1\rangle_L$$-state, for general stabiliser codes! In this case it does, but it's coincidental.
You should try this by hand, but you can show that the family of states corresponding to $$|0\rangle_L$$, when measured, will always give you a measurement outcome with an odd number of 0s, while measuring the $$|1\rangle_L$$-state will always give you an odd number of 1s. That is how you distinguish them in experiment.