cirq.devices.TiltedSquareLattice

A grid lattice rotated 45-degrees.

Inherits From: NamedTopology

This topology is based on Google devices where plaquettes consist of four qubits in a square connected to a central qubit:

x   x
  x
x   x

The corner nodes are not connected to each other. width and height refer to the rectangle formed by rotating the lattice 45 degrees. width and height are measured in half-unit cells, or equivalently half the number of central nodes. An example diagram of this topology is shown below. It is a "tilted-square-lattice-6-4" with width 6 and height 4.

      x
      │
 x────X────x
 │    │    │

x────X────x────X────x │ │ │ │ x────X────x────X───x │ │ │ x────X────x │ x

Nodes are 2-tuples of integers which may be negative. Please see get_placements for mapping this topology to a GridQubit Device.

width Dataclass field
height Dataclass field

Methods

draw

View source

Draw this graph using Matplotlib.

Args
ax Optional matplotlib axis to use for drawing.
tilted If True, directly position as (row, column); otherwise, rotate 45 degrees to accommodate the diagonal nature of this topology.
kwargs Additional arguments to pass to nx.draw_networkx.

nodes_as_gridqubits

View source

Get the graph nodes as cirq.GridQubit

__eq__

graph Instance of NotImplementedType
n_nodes Instance of NotImplementedType
name Instance of NotImplementedType