def is_sim_meas(op1: str, op2: str) -> bool:
    """Returns True if op1 and op2 can be simultaneously measured.
    
    Args:
        op1: Pauli string on n qubits.
        op2: Pauli string on n qubits.
    
    Examples:
        is_sim_meas("IZI", "XIX") -> True
        
        is_sim_meas("XZ", "XX") -> False
    """
    if len(op1) != len(op2):
        raise ValueError(
            "Pauli operators act on different numbers of qubits."
        )
    
    for (a, b) in zip(op1, op2):
        if a != b and a != "I" and b != "I":
            return False
    return True