cirq.GridQubit

class cirq.GridQubit(row: int, col: int)[source]

A qubit on a 2d square lattice.

GridQubits use row-major ordering:

GridQubit(0, 0) < GridQubit(0, 1) < GridQubit(1, 0) < GridQubit(1, 1)

New GridQubits can be constructed by adding or subtracting tuples

>>> cirq.GridQubit(2, 3) + (3, 1)
cirq.GridQubit(5, 4)

>>> cirq.GridQubit(2, 3) - (1, 2)
cirq.GridQubit(1, 1)
__init__(row: int, col: int)

Initialize self. See help(type(self)) for accurate signature.