Compilation and Synthesis Algorithms (bqskit.passes
)
Partitioning Passes
These passes will group together gates in the circuit. It is recommended to use the QuickPartitioner currently.
|
The ClusteringPartitioner Pass. |
|
The GreedyPartitioner Pass. |
|
The ScanPartitioner Pass. |
|
A partitioner that iterates over circuit gates only once. |
The GroupSingleQuditGatePass Pass. |
Synthesis Passes
These passes perform synthesis. Decomposition passes break down unitaries into smaller ones and will need to be followed up by another synthesis pass to convert the circuit to native gates.
|
A pass implementing the LEAP search synthesis algorithm. |
|
A pass implementing the QSearch A* synthesis algorithm. |
|
A pass performing one round of decomposition from the QFAST algorithm. |
|
The QPredictDecompositionPass class. |
SynthesisPass abstract class. |
|
|
A pass that synthesizes diagonal unitaries into Walsh functions. |
Processing Passes
|
The ExhaustiveGateRemovalPass class. |
The IterativeScanningGateRemovalPass class. |
|
|
The ScanningGateRemovalPass class. |
|
The TreeScanningGateRemovalPass class. |
|
The SubstitutePass class. |
Retargeting Passes
|
The AutoRebase2QuditGatePass class. |
Convert to a general single-qudit gate from the model's gate set. |
|
|
The Rebase2QuditGatePass class. |
Control Passes
This are passes that are used to manage control flow inside of a workflow.
|
The DoWhileLoopPass class. |
|
A pass that executes other passes on each block in the circuit. |
|
The IfThenElsePass class. |
|
The WhileLoopPass class. |
|
The DoThenDecide class. |
|
The ParallelDo class. |
Predicates
This objects are designed as conditions for use with control passes.
The PassPredicate abstract base class. |
|
The ChangePredicate class. |
|
|
The GateCountPredicate class. |
|
Check if many-qudit gates are in the circuit and/or model. |
|
The NotPredicate class. |
|
The WidthPredicate class. |
The PhysicalPredicate class. |
|
The SinglePhysicalPredicate class. |
|
The MultiPhysicalPredicate class. |
|
A predicate that checks if the model has single qudit gates. |
|
A predicate that checks if the model has a general single qudit gate. |
|
A predicate that checks if the model has a RZ or U1 and SX or RX gate. |
|
A predicate that checks if all single qudit gates are constant. |
Rule-based Passes
These passes apply fixed rules to a circuit to transform it.
The CHToCNOTPass class. |
|
The CNOTToCZPass class. |
|
The CNOTToCHPass class. |
|
The CNOTToCYPass class. |
|
The CYToCNOTPass class. |
|
The SwapToCNOTPass class. |
|
The U3Decomposition class. |
|
|
The ZXZXZDecomposition class. |
Mapping Passes
These passes either perform qubit placement, layout, routing or otherwise are involved the qubit mapping process.
|
Uses the Sabre algorithm to layout the circuit. |
Find a placement by starting with the most connected qudit. |
|
Place the logical qubits on the first n physical qubits. |
|
|
Uses the Sabre algorithm to route the circuit. |
|
Sets a target machine model for future passes to target. |
Place the circuit on the machine model. |
|
|
Pass that selects necessary subtopologies from the model. |
|
Layout algorithm using permutation-aware mapping. |
|
|
|
Embed permutation aware synthesis results into a flow for future use. |
Extracts and saves the current target machine model's connectivity. |
|
Restores the connectivity of the target machine model. |
PAM Verification Passes
These passes either perform upper-bound error analysis of the PAM process.
Tag the blocks with the PAM block data. |
|
Calculates error of a panel consisting of blocks tagged with PAM data. |
|
Untag the blocks with the PAM block data. |
|
|
Calculates the error of a PAM sequence. |
Utility Passes
The CompressPass class. |
|
The RecordStatsPass class. |
|
|
The SetRandomSeedPass class. |
The UnfoldPass class. |
|
|
The UpdateDataPass class. |
|
Converts single-qubit general unitary gates to U3 Gates. |
|
Converts single-qudit general unitary gates to Variable Unitary Gates. |
|
Converts blocks of one type to another type. |
|
A pass that logs a message to the BQSKit log. |
|
Ensure all blocks are at least a given size. |
|
A pass that logs the current error to the BQSKit log. |
A pass that inserts single-qudit gates around multi-qudit gates. |
|
A pass that catalogs circuit structures used in a partitioned circuit. |
|
Clear all block data and passed down data from the pass data. |
IO Passes
|
The LoadCheckpointPass class. |
|
The SaveCheckpointPass class. |
|
The SaveIntermediate class. |
|
Search Heuristics
The HeuristicFunction base class. |
|
|
The AStarHeuristic HeuristicFunction class. |
|
The GreedyHeuristic HeuristicFunction class. |
The DijkstraHeuristic HeuristicFunction class. |
Search Layer Generators
Layer generators can be used to modify how search based synthesis algorithms extend circuit templates.
|
The DiscreteLayerGenerator class. |
The FourParamGenerator class. |
|
Layer Generator for search that adds gates at each time step. |
|
|
Layer Generator for search that starts from a seed. |
|
The SimpleLayerGenerator class. |
|
The SingleQuditLayerGenerator class. |
|
Layer Generator for search that builds circuits from a single gate. |
|
A layer generator for use with wide gates like an iToffoli. |