View source on GitHub 
Places logical qubits in the circuit onto physical qubits on the device.
Inherits From: AbstractInitialMapper
cirq.LineInitialMapper(
device_graph: nx.Graph
) > None
Starting from the center physical qubit on the device, attempts to map disjoint lines of logical qubits given by the circuit graph onto one long line of physical qubits on the device, greedily maximizing each physical qubit's degree. If this mapping cannot be completed as one long line of qubits in the circuit graph mapped to qubits in the device graph, the line can be split as several line segments and then we: (i) Map first line segment. (ii) Find another high degree vertex in G near the center. (iii) Map the second line segment (iv) etc. A line is split by mapping the next logical qubit to the nearest available physical qubit to the center of the device graph.
The expected runtime of this strategy is O(m logn + n^2) where m is the # of operations in the given circuit and n is the number of qubits. The first term corresponds to the runtime of 'make_circuit_graph()' and the second for 'initial_mapping()'.
Args  

device_graph

device graph 
Methods
initial_mapping
initial_mapping(
circuit: 'cirq.AbstractCircuit'
) > Dict['cirq.Qid', 'cirq.Qid']
Maps disjoint lines of logical qubits onto lines of physical qubits.
Args  

circuit

the input circuit with logical qubits 
Returns  

a dictionary that maps logical qubits in the circuit (keys) to physical qubits on the device (values). 
__eq__
__eq__(
other: _SupportsValueEquality
) > bool
__ne__
__ne__(
other: _SupportsValueEquality
) > bool