Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Functions
kahn Namespace Reference

Functions

def kahn_partition (c, max_qubit, preparts=None)
 
def kahn_partition_preparts (c, max_qubit, preparts)
 
def split_partition (preparts, g, rg)
 
def test_split_partition ()
 

Function Documentation

◆ kahn_partition()

def kahn.kahn_partition (   c,
  max_qubit,
  preparts = None 
)
Partition a circuit greedily using Kahn's algorithm

Args:
    
    c: SQUANDER Circuit to partition
    
    max_qubit: Max qubits per partition
    
    preparts: Optional predefined partitions

Returns:
    
    Partitioned circuit, parameter order (source_idx, dest_idx, param_count), partition assignments

Definition at line 7 of file kahn.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ kahn_partition_preparts()

def kahn.kahn_partition_preparts (   c,
  max_qubit,
  preparts 
)
Build partitioned circuit from predefined partitions

Args:
    
    c: SQUANDER Circuit to partition
    
    max_qubit: Max qubits per partition
    
    preparts: Predefined partition assignments

Returns:
    
    Partitioned circuit, parameter order (source_idx, dest_idx, param_count), partition assignments

Definition at line 80 of file kahn.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ split_partition()

def kahn.split_partition (   preparts,
  g,
  rg 
)
Split partitions into connected components

Args:
    
    preparts: Initial partitions
    
    g: Forward dependency graph
    
    rg: Reverse dependency graph

Returns:
    
    List of split partitions

Definition at line 168 of file kahn.py.

Here is the caller graph for this function:

◆ test_split_partition()

def kahn.test_split_partition ( )
Test split_partition function for correctness.

Definition at line 202 of file kahn.py.

Here is the call graph for this function: