QuTech-Delft / OpenSquirrel

A flexible (Python-based) quantum program compiler
Apache License 2.0
7 stars 2 forks source link

investigate AB decomposition in CNOT decomposer #99

Closed pablolh closed 8 months ago

pablolh commented 8 months ago

Currently the CNOTDecomposer uses the ABC decomposition of an arbitrary untiary as underlying mechanism to produce a decomposition of 2q gates into CNOTs. This means the controlled gate is decomposed as AXBXC with ABC=I, which is then controlled and turned into A CNOT B CNOT C (on the right qubits).

This means each decomposed 2q gate (only the controlled ones are supported) requires 2 CNOTS.

However, for some gates (which?), only 1 CNOT is enough. For instance, CZ is H.CNOT.H

Such a shorter decomposition would obviously be desirable.

Goal of this issue: Can we get U = AXB with AB=I in some cases?