class pyquil.device.NxDevice(topology)[source]

A shim over the AbstractDevice API backed by a NetworkX graph.

A Device holds information about the physical device. Specifically, you might want to know about connectivity, available gates, performance specs, and more. This class implements the AbstractDevice API for devices not available via get_devices(). Instead, the user is responsible for constructing a NetworkX graph which represents a chip topology.


Initialize self. See help(type(self)) for accurate signature.

Return type:None


__init__(topology) Initialize self.
rtype:List[Tuple[Any, …]]
get_isa([oneq_type, twoq_type]) Construct an ISA suitable for targeting by compilation.
get_specs() Construct a Specs object required by compilation
qubit_topology() The connectivity of qubits in this device given as a NetworkX graph.
qubits() A sorted list of qubits in the device topology.