cirq.devices.LineTopology

A 1D linear topology.

Inherits From: NamedTopology

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.

__eq__

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