cirq.GridQubit

class cirq.GridQubit(row, col)[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, col)[source]

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

Methods

from_proto(q)
is_adjacent(other) Determines if two qubits are adjacent qubits.
to_proto(out) Return the proto form, mutating supplied form if supplied.