|
Sequential Quantum Gate Decomposer
v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
|
Functions | |
| def | _enumerate (target_gate, target_qubit, input_groups, deps, g, gate_to_qubit, S, max_qubit) |
| def | _enumerate_groups (g, rg, gate_to_qubit, S, max_qubit, use_gtqcp) |
| def | _enumerate_gtqcp (target_gate, target_qubit, input_groups, deps, g, gate_to_qubit, S, max_qubit) |
| def | _get_gate_dependencies (g, rg, gate_to_qubit, S, max_qubit) |
| def | _get_starting_gates (g, rg, gate_to_qubit, S) |
| def | _remove_best_partition (qubit_results, g, rg, gate_to_qubit, start_qubit, deps) |
| def | _test_gtqcp () |
| def | _test_tdag () |
| def | _test_tdag_qasm (use_gtqcp=False) |
| def | _test_tdag_single_qubit () |
| def | tdag_max_partitions (c, max_qubit, use_gtqcp=False) |
|
private |
Recursively enumerate gate groups for a target gate
Args:
target_gate: Gate to start enumeration
target_qubit: Qubit index
input_groups: Current qubit groups
deps: Gate dependencies
g: Forward dependency graph
gate_to_qubit: Mapping of gates to qubits
S: Starting gates per qubit
max_qubit: Max qubits per partition
Returns:
Set of valid qubit groups
|
private |
Enumerate possible gate groups for partitioning
Args:
g: Forward dependency graph
rg: Reverse dependency graph
gate_to_qubit: Mapping of gates to qubits
S: Starting gates per qubit
max_qubit: Max qubits per partition
use_gtqcp: Use GTQCP variant
Returns:
Set of gate groups and their dependencies
Definition at line 107 of file tdag.py.


|
private |
Recursively enumerate gate groups for a target gate using GTQCP variant.
Args:
target_gate: Gate to start enumeration
target_qubit: Qubit index
input_groups: Current qubit groups
deps: Gate dependencies
g: Forward dependency graph
gate_to_qubit: Mapping of gates to qubits
S: Starting gates per qubit
max_qubit: Max qubits per partition
Returns:
Set of valid qubit groups
|
private |
Get gate dependencies for each gate within qubit constraints
Args:
g: Forward dependency graph
rg: Reverse dependency graph
gate_to_qubit: Mapping of gates to qubits
S: Starting gates per qubit
max_qubit: Max qubits per partition
Returns:
Dictionary of gate dependencies
Definition at line 70 of file tdag.py.

|
private |
Get starting gates for each qubit in the circuit
Args:
g: Forward dependency graph
rg: Reverse dependency graph
gate_to_qubit: Mapping of gates to qubits
S: Set of initial gates
Returns:
Dictionary mapping qubits to their starting gates
Definition at line 8 of file tdag.py.

|
private |
Remove the best partition from the dependency graphs
Args:
qubit_results: Candidate qubit groups
g: Forward dependency graph
rg: Reverse dependency graph
gate_to_qubit: Mapping of gates to qubits
start_qubit: Starting gates per qubit
deps: Gate dependencies
Returns:
List of gate indices in the best partition
Definition at line 233 of file tdag.py.

|
private |
|
private |
|
private |
|
private |
| def tdag.tdag_max_partitions | ( | c, | |
| max_qubit, | |||
use_gtqcp = False |
|||
| ) |
Partition a circuit using TDAG algorithm
Args:
c: SQUANDER Circuit to partition
max_qubit: Max qubits per partition
use_gtqcp: Use GTQCP variant
Returns:
Partitioned circuit, parameter order (source_idx, dest_idx, param_count), partition assignments
Definition at line 43 of file tdag.py.


1.8.13