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)
__init__(row: int, col: int)[source]

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


from_proto_dict(proto_dict) Proto dict must have ‘row’ and ‘col’ keys.
is_adjacent(other) Determines if two qubits are adjacent qubits.
to_proto_dict() Return the proto in dictionary form.