cirq.google.GreedySequenceSearchStrategy

Greedy search method for linear sequence of qubits on a chip.

Inherits From: LinePlacementStrategy

algorithm Greedy algorithm to be used. Available options are: best - runs all heuristics and chooses the best result, largest_area - on every step takes the qubit which has connection with the largest number of unassigned qubits, and minimal_connectivity - on every step takes the qubit with minimal number of unassigned neighbouring qubits.

Methods

place_line

View source

Runs line sequence search.

Args
device Chip description.
length Required line length.

Returns
Linear sequences found on the chip.

Raises
ValueError If search algorithm passed on initialization is not recognized.