Optimizing quantum circuits

THIS SECTION IS NOT COMPLETE YET AND NEEDS UPDATING

Different quantum circuits are equivalent. For example, the following pairs of quantum circuits have exactly the same effect on the quantum state.

Hadamard and two rotations:

q[0]
 
q[0]
 
-1.57
 

Two successive Hadamard gates are equivalent to the identity operation.

q[0]
 
 
q[0]
 

The CNOT gate is equivalent to the CZ gate surrounded by two single qubit rotations.

A quantum compiler can use this information to reduce the number of gates in a quantum circuit or replace gates that have a known bad fidelity with a series of gates that perform better on a given device.

Optimizing with ProjectQ

With the ProjectQ backend of the SDK it is possible to optimize quantum circuits. See the documentation of ProjectQ on compiler engines for details.