Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite standard equivalence library for full connectivity
This rewrites the standard equivalence library around the core of making it fully connected, such that there are always paths through the equivalence relations to translate a standard-library 2q gate into the minimal number of standard-library 2q gates from a different local equivalence class. Similarly at the 1q level, the Pauli relations, Clifford relations, and Clifford+T relations are arranged such that it is always possible that a circuit in any of those classes can be translated to any basis within the same class or higher. Unfortunately, the current algorithm of the `BasisTranslator` is not really suitable for such a library; its algorithm is designed and efficient at finding _any_ translation, and cannot be directly weighted to produce the _best_ translation when multiple possibilities are available. This new library in this commit requires a different translation algorithm to realise its benefits. I call the new algorithm the `BasisConstructor`, but it still needs writing into a transpiler pass.
- Loading branch information