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 via get_devices(). Instead, the user is responsible for constructing a NetworkX graph which represents a chip topology.

__init__(topology)[source]

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

Return type:None

Methods

__init__(topology) Initialize self.
edges()
rtype:List[Tuple[int, int]]
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.