qat.pbo

The qat.pbo module, for Pattern Based Optimization, provides an interface to efficiently manipulate quantum circuit via rule-based rewriting.

A dedicated section, in user guide, explains the rewriting quantum circuits mechanism.

Automated rewriting

This module provides automated rules to rewrite circuits

These decompositions can be used with KAKCompression, collections are designed to be used with PatternManager

List of decompositions is returned by list_decompositions()

qat.pbo.kak.list_decompositions()

List available decompositions

Defining patterns

Some structure are designed to simplify the definition of a pattern

qat.pbo.AbstractRegister

Register placeholder, to define a pattern

qat.pbo.GateName

Gate name placeholder, to define a pattern

qat.pbo.VAR

Variable placeholder, to define a pattern

Manipulating patterns

GraphCircuit provides an API to replace manually a pattern present in a circuit by an equivalent pattern

PatternGroup defines a group of equivalent pattern. This group can be used as input of PatternManager to replace automatically patterns in a circuit

qat.pbo.GraphCircuit

A low-level circuit rewriter

qat.pbo.PatternGroup

Group of equivalent patterns