cirq.LineTopology

A 1D linear topology.

Inherits From: NamedTopology

Used in the notebooks

Used in the tutorials

Node indices are contiguous integers starting from 0 with edges between adjacent integers.

n_nodes The number of nodes in a line.

n_nodes Dataclass field

Methods

draw

View source

Draw this graph using Matplotlib.

Args
ax Optional matplotlib axis to use for drawing.
tilted If True, draw as a horizontal line. Otherwise, draw on a diagonal.
**kwargs Additional arguments to pass to nx.draw_networkx.

nodes_as_linequbits

View source

Get the graph nodes as cirq.LineQubit

__eq__

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