# Devices¶

An appropriate Device is automatically created when using get_qc() and it is stored on the QuantumComputer object as the device attribute.

There are properties of real quantum computers that go beyond the quantum abstract machine (QAM) abstraction. Real devices have performance specs, limited ISAs, and restricted topologies. AbstractDevice provides an abstract interface for accessing properties of a real quantum device or for mocking out relevant properties for a more realistic QVM.

 Device(name, raw) A device (quantum chip) that can accept programs. NxDevice(topology) A shim over the AbstractDevice API backed by a NetworkX graph.

The data structures used are documented here

 ISA(qubits, edges) Basic Instruction Set Architecture specification. Specs(qubits_specs, edges_specs) Basic specifications for the device, such as gate fidelities and coherence times.

## Utility functions¶

pyquil.device.isa_from_graph(graph, oneq_type='Xhalves', twoq_type=None)[source]

Generate an ISA object from a NetworkX graph.

Parameters
Return type

ISA

pyquil.device.specs_from_graph(graph)[source]

Generate a Specs object from a NetworkX graph with placeholder values for the actual specs.

Parameters

graph (Graph) – The graph

Return type

Specs

pyquil.device.isa_to_graph(isa)[source]

Construct a NetworkX qubit topology from an ISA object.

Parameters

isa (ISA) – The ISA.

Return type

Graph

pyquil.device.gates_in_isa(isa)[source]

Generate the full gateset associated with an ISA.

Parameters

isa (ISA) – The instruction set architecture for a QPU.

Return type

List[Gate]

Returns

A sequence of Gate objects encapsulating all gates compatible with the ISA.