Greedy search method for linear sequence of qubits on a chip.
Inherits From: LinePlacementStrategy
cirq_google.line.GreedySequenceSearchStrategy(
algorithm: str = 'best'
) -> None
Args |
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
place_line(
device: 'cirq_google.GridDevice', length: int
) -> cirq_google.line.placement.GridQubitLineTuple
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.
|