cirq.experiments.GridInteractionLayer

A layer of aligned or staggered two-qubit interactions on a grid.

Layers of this type have two different basic structures, aligned:

- - - - - - - - - - - - - - - - - -

and staggered:

- - -

  • - - * - - -
  • - - * - - -
  • - - *

Other variants are obtained by offsetting these lattices to the right by some number of columns, and/or transposing into the vertical orientation. There are a total of 4 aligned and 4 staggered variants.

The 2x2 unit cells for the aligned and staggered versions of this layer are, respectively:

- -

and

-

  • *-

with left/top qubits at (0, 0) and (1, 0) in the aligned case, or (0, 0) and (1, 1) in the staggered case. Other variants have the same unit cells after transposing and offsetting.

col_offset Number of columns by which to shift the basic lattice.
vertical Whether gates should be oriented vertically rather than horizontally.
stagger Whether to stagger gates in neighboring rows.

col_offset Dataclass field
vertical Dataclass field
stagger Dataclass field

Methods

__contains__

View source

Checks whether a pair is in this layer.

__eq__

col_offset 0
stagger False
vertical False