def test_group_paulis_type_mismatch() -> None:
    """Test that the group paulis type is not correct"""
    qubits_1 = cirq.LineQubit.range(3)
    qubits_2 = [
        cirq.GridQubit(0, 1),
        cirq.GridQubit(1, 1),
        cirq.GridQubit(1, 0),
        cirq.GridQubit(1, 2),
        cirq.GridQubit(2, 1),
    ]
    qubits_3 = cirq.LineQubit.range(8)

    circuit_1 = cirq.FrozenCircuit(_create_ghz(3, qubits_1))
    circuit_2 = cirq.FrozenCircuit(_create_ghz(5, qubits_2))
    circuit_3 = cirq.FrozenCircuit(_create_ghz(8, qubits_3))

    circuits_to_pauli: dict[cirq.FrozenCircuit, list[list[cirq.PauliString]]] = {}
    circuits_to_pauli[circuit_1] = [
        _generate_qwc_paulis(
            _generate_random_pauli_string(qubits_1, enable_coeff=True, allow_pauli_i=False), 6
        )
        for _ in range(3)
    ]
    circuits_to_pauli[circuit_2] = [_generate_random_pauli_string(qubits_2, True) for _ in range(3)]
    circuits_to_pauli[circuit_3] = [_generate_random_pauli_string(qubits_3, True) for _ in range(3)]

    with pytest.raises(
        TypeError,
        match="Expected all elements to be sequences of ops.PauliString, "
        "but found <class 'cirq.ops.pauli_string.PauliString'>.",
    ):
        measure_pauli_strings(
            circuits_to_pauli, cirq.Simulator(), 1000, 1000, 1000, np.random.default_rng()
        )
Test that the group paulis type is not correct
cirq-core/cirq/contrib/paulistring/pauli_string_measurement_with_readout_mitigation_test.py