BQSKit / bqskit

Berkeley Quantum Synthesis Toolkit
Other
118 stars 33 forks source link

Automatic generation of translation-invariant gate layers #179

Open aaronszasz opened 1 year ago

aaronszasz commented 1 year ago

Idea for a new feature:

Suppose we want our circuit to be translation invariant, e.g. for state preparation on a chain with periodic boundary conditions.

For example, we want a layer to look like

CNOT CNOT CNOT CNOT
| | | | | | | |
U3 U3 U3 U3 U3 U3 U3 U3

With all the even U3 being the same as each other and all the odd U3 also being the same as each other, in other words fixed to have the same parameters. So this layer would be translation-invariant with a 2-qubit unit cell.

Currently, naively building a layer with the gates shown above will allow separate optimization of the parameters of all the U3 gates. The translation-invariant case could dramatically speed up optimization by reducing the number of parameters to be optimized.

In the new functionality, a user would specify the unit cell where no additional symmetry is assumed, as well as the number of copies they want, and the translation-invariant layer would be generated automatically.

e.g. for the above example Unit cell: CNOT | |
U3 U3

copies = 4

=======

I'll have time to add this feature in October-ish, though if someone else has time sooner, please go ahead