ISMAGS#
- class pennylane_calculquebec.processing.steps.placement.ISMAGS(machine_name: str, use_benchmark=True, q1_acceptance=0.5, q2_acceptance=0.5, excluded_qubits=[], excluded_couplers=[])#
Bases:
Placementfinds a mapping between the circuit’s wires and the machine’s qubits using the ISMAGS subgraph isomorphism algorithm
ISMAGS is similar to VF2 except it also considers symmetries which can make it faster in some cases
Plus, the networkx implementation has capabilities for searching for largest common subgraphs
constructor for placement algorithms
- Parameters:
use_benchmark (bool, optional) – should we use benchmarks during placement? Defaults to True.
q1_acceptance (float, optional) – what is the level of acceptance for state 1 readout? Defaults to 0.5.
q2_acceptance (float, optional) – what is the level of acceptance for cz fidelity? Defaults to 0.5.
excluded_qubits (list, optional) – what qubits should we exclude from the mapping? Defaults to [].
excluded_couplers (list, optional) – what couplers should we exclude from the mapping? Defaults to [].
Methods
execute(tape)places the circuit on the machine's connectivity using ISMAGS subgraph isomorphism algorithm
- execute(tape)#
places the circuit on the machine’s connectivity using ISMAGS subgraph isomorphism algorithm
If there is no perfect match, the missing nodes are mapped with qubits that minimize the subsequent routing path
find largest common subgraph
for each unmapped node
find the best neighbour (using cost function)
find machine node with shortest path from already mapped machine node
map wires in all operations and measurements
- Parameters:
tape (QuantumTape) – The tape to act on
- Raises:
Exception – There should be enough space on the machine to run the circuit
- Returns:
The transformed quantum tape
- Return type:
QuantumTape