Topology¶
Topology class for mapping distributed quantum computers.
- class diskit.components.topology.Topology(qmap: Optional[Dict[str, List[str]]] = None)¶
Topology class for a distributed architecture.
- add_qpu(qpu: str, num_qubits: int, qreg: Optional[str] = None, indices: Optional[List[int]] = None)¶
Add a QPU to the qmap. qpu is the name of the QPU, and num_qubits is the number of qubits on the QPU.
- are_adjacent(qubit1: str, qubit2: str)¶
Return True if qubit1 and qubit2 are adjacent
- create_emap()¶
Create an emap from the qmap.
- create_qmap(num_qpus: int, num_qubits: List[int], name: str = 'qpu')¶
Create a qmap with num_qpus QPUs, each with num_qubits qubits.
- get_all_qubits()¶
Return all the qubits in the qmap.
- get_epr_id(host)¶
Return the epr qubit IDs.
- get_host(qubit: str)¶
Return the host of qubit.
- get_qpu(qubit: Qubit)¶
Return the QPU of a qubit.
- get_qubits(qpu: str)¶
Return the qubits on a QPU.
- get_regs()¶
Return the QuantumRegisters in the qmap.
- num_hosts()¶
Return the total number of hosts in the topology
- num_qubits()¶
Return the total number of qubits in the topology
- property qmap¶
The topology map.
- reinitialize(qmap: Dict[str, List[str]])¶
Reinitialize the topology object by providing a new qmap
- remove_qpu(qpu: str)¶
Remove a QPU from the qmap.