def __new__(cls, row: int, col: int, *, dimension: int) -> cirq.GridQid:
        """Creates a grid qid at the given row, col coordinate

        Args:
            row: the row coordinate
            col: the column coordinate
            dimension: The dimension of the qid's Hilbert space, i.e.
                the number of quantum levels.
        """
        dimension = int(dimension)
        key = (row, col, dimension)
        inst = cls._cache.get(key)
        if inst is None:
            cls.validate_dimension(dimension)
            inst = super().__new__(cls)
            inst._row = row
            inst._col = col
            inst._dimension = dimension
            inst._hash = ((dimension - 2) * 1_000_003 + hash(col)) * 1_000_003 + hash(row)
            cls._cache[key] = inst
        return inst
Creates a grid qid at the given row, col coordinate

        Args:
            row: the row coordinate
            col: the column coordinate
            dimension: The dimension of the qid's Hilbert space, i.e.
                the number of quantum levels.
        
cirq-core/cirq/devices/grid_qubit.py