Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
This example shows that implementation of multiple control-x (MCX) logic, using the Classiq synthesis engine, yields different circuit results for different quantum hardware. The fictitious hardware created here demonstrates how to insert your own custom-designed machine. For comparison, create two types of hardware with cx, u basis gates. The difference between them manifests in the connectivity map: one has linear connectivity while the other has all-to-all connectivity.
Output:
Output:
Comparison of the two circuits shows that applying MCx using different connectivity maps yields different implementation. Using “all-to-all” connectivity, the synthesis engine chooses as the best implementation a recourse based on “Maslov2015” [1] that was written on the Classiq platform. Using that, the manufactured circuit has 18 qubits; i.e., it uses two auxiliary qubits. The total depth of the circuit is:
Output:
When using linear connectivity, the best implementation chosen by the synthesis engine is, in fact, different: an algorithm developed by Classiq, which is better suited for this map. Here, the manufactured circuit uses 18 qubits with only one auxiliary and has a depth of:
Output:

References

[1]: Maslov, D., 2016. Advantages of using relative-phase Toffoli gates with an application to multiple control Toffoli optimization. Physical Review A, 93(2), p.022311.