surface_sim.layouts.Layout.projection_matrix#

layouts.Layout.projection_matrix(stab_type)#

Returns the projection matrix, mapping data qubits (defined by a parameter 'role' equal to 'data') to ancilla qubits (defined by a parameter 'role' equal to 'anc') measuing a given stabilizerr type (defined by a parameter 'stab_type' equal to stab_type).

This matrix can be used to project a final set of data-qubit measurements to a set of syndromes.

Parameters:
stab_type

The type of the stabilizers that the data qubit measurement is being projected to.

Returns:
DataArray

The projection matrix.