deltakit.explorer.codes.UnrotatedToricCode.check_logical_operators_are_independent#

static UnrotatedToricCode.check_logical_operators_are_independent(x_logicals: Iterable[Iterable[PauliX]], z_logicals: Iterable[Iterable[PauliZ]])#

Check that the logical operators are independent. In other words, check that each logical operator commutes with all other logical operators except for their pair (i.e. the logical operator of opposite type located at the same index). Raise a ValueError otherwise.