def test_group_paulis_are_not_qwc() -> None:
    """Test that the group paulis are not qwc."""
    qubits = cirq.LineQubit.range(5)

    circuit = cirq.FrozenCircuit(_create_ghz(5, qubits))

    pauli_str1: cirq.PauliString = cirq.PauliString({qubits[0]: cirq.X, qubits[1]: cirq.Y})
    pauli_str2: cirq.PauliString = cirq.PauliString({qubits[0]: cirq.Y})

    circuits_to_pauli: dict[cirq.FrozenCircuit, list[cirq.PauliString]] = {}
    circuits_to_pauli[circuit] = [[pauli_str1, pauli_str2]]  # type: ignore
    with pytest.raises(
        ValueError,
        match="The group of Pauli strings are not " "Qubit-Wise Commuting with each other.",
    ):
        measure_pauli_strings(
            circuits_to_pauli, cirq.Simulator(), 1000, 1000, 1000, np.random.default_rng()
        )
Test that the group paulis are not qwc.
cirq-core/cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation_test.py