View source on GitHub |
Gives adjacency list representation of a chip.
cirq_google.line.placement.chip.chip_as_adjacency_list(
device: 'cirq_google.GridDevice'
) -> Dict[cirq.GridQubit, List[cirq.GridQubit]]
The adjacency list is constructed in order of above, left_of, below and right_of consecutively.
Args | |
---|---|
device
|
Chip to be converted. |
Returns | |
---|---|
Map from nodes to list of qubits which represent all the neighbours of given qubit. |