qat.plugins.Graphopt

class qat.plugins.Graphopt(verbose=False, expandonly=False, directed=False, rminvos=False)

An circuit optimization Plugin that uses pattern rewriting coupled with phase polynomial simplifications.

Parameters
  • verbose (bool) – If set to True, some informations are printed in the standard output during the optimization. Defaults to False.

  • expandonly (bool) – If set to True, some gates (such as Toffoli and CPH) will be split into CNOT + Rz + H gates without further optimization. Defaults to False.

  • directed (bool) – If set to True, the orientations of CNOTS will be preserved during the optimization (thus disabling some suboptimizations). Defaults to False.

  • rminvos (bool) – If set to True, a preprocessing will first remove subcircuit of the shape U.U where U is an involution (CNOT, H, Z). Defaults to False.

compile(batch, specs)

Compiles a Batch into another Batch according to some hardware specs

Parameters
Returns

compiled batch

Return type

Batch