[Named Topologies] Add nodes_to_linequbits
method to LineTopology
#4710
Labels
area/devices
good first issue
This issue can be resolved by someone who is not familiar with the codebase. A good starting issue.
kind/feature-request
Describes new functionality
triage/accepted
A consensus emerged that this bug report, feature request, or other action should be worked on
Routing utilities currently present in cirq contrib expect a networkx graph of device (/target topology) where each node is a
cirq.Qid
.NamedTopology
stores topology graphs where each node is a number / tuple.TiltedSquareLattice
has anodes_to_gridqubits
method which can provide a mapping from the graph nodes to the corresponding grid qubits.Cirq/cirq-core/cirq/devices/named_topologies.py
Line 233 in d42e058
This can be used to quickly get the graph needed for routing circuits from the topology graph as follows:
A similar convenience method,
nodes_to_linequbits
, should be added to theLineQubit
named topology as well.cc @mpharrigan
The text was updated successfully, but these errors were encountered: