- class AQC(optimizer=None, seed=None)¶
A generic implementation of Approximate Quantum Compiler. This implementation is agnostic of the underlying implementation of the approximate circuit, objective, and optimizer. Users may pass corresponding implementations of the abstract classes:
Optimizer is an instance of
Optimizerand used to run the optimization process. A choice of optimizer may affect overall convergence, required time for the optimization process and achieved objective value.
Approximate circuit represents a template which parameters we want to optimize. Currently, there’s only one implementation based on 4-rotations CNOT unit blocks:
CNOTUnitCircuit. See the paper for more details.
Approximate objective is tightly coupled with the approximate circuit implementation and provides two methods for computing objective function and gradient with respect to approximate circuit parameters. This objective is passed to the optimizer. Currently, there’s only one implementation based on 4-rotations CNOT unit blocks:
DefaultCNOTUnitObjective. This is a naive implementation of the objective function and gradient and may suffer from performance issues.
Methods Defined Here
Approximately compiles a circuit represented as a unitary matrix by solving an optimization problem defined by
approximate_circuitas a template for the approximate circuit.