CouplingMap¶

class
CouplingMap
(couplinglist=None, description=None)[Quellcode]¶ Bases:
object
Directed graph specifying fixed coupling.
Nodes correspond to physical qubits (integers) and directed edges correspond to permitted CNOT gates
Create coupling graph. By default, the generated coupling has no nodes.
 Parameter
couplinglist (list or None) – An initial coupling graph, specified as an adjacency list containing couplings, e.g. [[0,1], [0,2], [1,2]].
description (str) – A string to describe the coupling map.
Methods
Add directed edge to coupling graph.
Add a physical qubit to the coupling graph as a node.
Returns the undirected distance between physical_qubit1 and physical_qubit2.
Draws the coupling map.
Return a fully connected coupling map on n qubits.
Return qubits connected on a grid of num_rows x num_columns.
Return a fully connected coupling map on n qubits.
Return a fully connected coupling map on n qubits.
Gets the list of edges in the coupling graph.
Test if the graph is connected.
Return a set of qubits in the largest connected component.
Convert unidirectional edges into bidirectional.
Return the nearest neighbors of a physical qubit.
Returns a reduced coupling map that corresponds to the subgraph of qubits selected in the mapping.
Returns the shortest undirected path between physical_qubit1 and physical_qubit2.
Return the number of physical qubits in this graph.
Return a CouplingMap object for a subgraph of self.
Attributes

distance_matrix
¶ Return the distance matrix for the coupling map.

is_symmetric
¶ Test if the graph is symmetric.
Return True if symmetric, False otherwise

physical_qubits
¶ Returns a sorted list of physical_qubits