Determines if two qubits are adjacent qubits.

def is_adjacent(self, other: ops.Qid) -> bool:
        """Determines if two qubits are adjacent qubits."""
        return (isinstance(other, GridQubit) and
                abs(self.row - other.row) + abs(self.col - other.col) == 1)