pyquil.device.NxDevice¶
-
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 viaget_devices()
. Instead, the user is responsible for constructing a NetworkX graph which represents a chip topology.Methods
__init__
(topology)Initialize self.
edges
()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.