Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Classes | Namespaces | Functions | Variables
qgd_SABRE.py File Reference

A QGD Python class for mapping and routing circuits to different topologies. More...

Go to the source code of this file.

Classes

class  qgd_SABRE.qgd_SABRE
 

Namespaces

 qgd_SABRE
 

Functions

def qgd_SABRE.__init__ (self, quantum_circuit, topology, max_lookahead=4, max_E_size=20, W=0.5, alpha=0.9)
 Constructor of the class. More...
 
def qgd_SABRE.calculate_gate_depth (self, gate_idx, IDAG, resolved_gates)
 Calculates the number of predecessing unresolved gates for a gate. More...
 
def qgd_SABRE.check_dependencies (self, gate_idx, IDAG, resolved_gates)
 Checks if gate dependencies have been resolved. More...
 
def qgd_SABRE.Floyd_Warshall (self)
 Floyd_warshall algorithm to calculate distance matrix. More...
 
def qgd_SABRE.generate_DAG (self, circuit)
 generates DAG of input circuit More...
 
def qgd_SABRE.generate_E (self, F, DAG, IDAG, resolved_gates)
 Generates lookahead extended layer containing all upcoming two qubit gates. More...
 
def qgd_SABRE.generate_inverse_DAG (self, circuit)
 generates inverse DAG of input circuit More...
 
def qgd_SABRE.geneterate_possible_connections (self)
 generate list of possible connections based on inputted topology More...
 
def qgd_SABRE.get_initial_layer (self, circuit)
 generates initial layer of input circuit for more see at: https://arxiv.org/pdf/1809.02573 More...
 
def qgd_SABRE.get_inverse_pi (self, pi)
 returns inverse pi mapping physical qubits Q to virtual qubits q More...
 
def qgd_SABRE.get_mapped_circuit (self, circuit, init_pi, gate_order, flags, parameters)
 Returns mapped circuit on physical qubits Q with swaps included. More...
 
def qgd_SABRE.get_reverse_circuit (self, circuit)
 generates reverse circuit More...
 
def qgd_SABRE.H_basic (self, pi, q1, q2)
 basic cost function that returns distance of two virtual qubits q1 and q2 More...
 
def qgd_SABRE.Heuristic_search (self, F, pi, DAG, IDAG)
 Heuristic search to map circuit to topology based on initial mapping pi this is an implementation of Algorithm 1 as seen in: https://arxiv.org/pdf/1809.02573. More...
 
def qgd_SABRE.is_gate_possible (self, pi, q_target, q_control)
 checks if connection between two virtual qubits q_target and q_control is possible, if second return is 1 it means gate might need to be inverted (with H gates in the case of CNOT) More...
 
def qgd_SABRE.map_circuit (self, parameters=np.array([]), iter_num=1)
 Returns mapped circuit on physical qubits Q with swaps included. More...
 
def qgd_SABRE.obtain_SWAPS (self, F, pi, DAG)
 Get all possible swaps between all involved qubits in F F front layer containing unresolved gates. More...
 
def qgd_SABRE.update_pi (self, pi, SWAP)
 basic cost function that returns distance of two virtual qubits q1 and q2 More...
 

Variables

 qgd_SABRE.alpha
 
 qgd_SABRE.circuit_qbit_num
 
 qgd_SABRE.D
 
 qgd_SABRE.initial_circuit
 
 qgd_SABRE.max_E_size
 
 qgd_SABRE.max_lookahead
 
 qgd_SABRE.neighbours
 
 qgd_SABRE.pi
 
 qgd_SABRE.qbit_num
 
 qgd_SABRE.topology
 
 qgd_SABRE.W
 

Detailed Description

A QGD Python class for mapping and routing circuits to different topologies.

Definition in file qgd_SABRE.py.