def place_line(self,
                   device: 'cirq.google.XmonDevice',
                   length: int) -> 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.
        """

        if not device.qubits:
            return GridQubitLineTuple()

        start = min(device.qubits)  # type: GridQubit
        sequences = []  # type: List[LineSequence]
        greedy_search = {
            'minimal_connectivity': [
                _PickFewestNeighbors(device, start),
            ],
            'largest_area': [
                _PickLargestArea(device, start),
            ],
            'best': [
                _PickFewestNeighbors(device, start),
                _PickLargestArea(device, start),
            ]
        }  # type: Dict[str, List[GreedySequenceSearch]]

        algos = greedy_search.get(self.algorithm)
        if algos is None:
            raise ValueError(
                "Unknown greedy search algorithm %s" % self.algorithm)

        for algorithm in algos:
            sequences.append(algorithm.get_or_search())

        return GridQubitLineTuple.best_of(sequences, length)