# cirq.TiltedSquareLattice

A grid lattice rotated 45-degrees.

Inherits From: `NamedTopology`

### Used in the notebooks

Used in the tutorials

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

### `nodes_to_gridqubits`

View source

Return a mapping from graph nodes to `cirq.GridQubit`

Args
`offset` Offest row and column indices of the resultant GridQubits by this amount. The offest positions the top-left node in the `draw(tilted=False)` frame.

### `__eq__`

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

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]