Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
This tutorial demonstrates automatic arithmetic operation management by the synthesis engine. It synthesizes a complex arithmetic expression, where uncomputation procedure, together with initialization and reuse of auxiliary qubits, are all automated. Given different global width or depth constraints results in different circuits. Define a quantum model that applies some quantum arithmetic operation on QNum variables.
You can try different optimization scenarios, below we introduce two examples:
  1. Optimizing over depth and constraining the maximal width to 10 qubits.
  2. Optimizing over depth and constraining the maximal width to 12 qubits.
Optimizing over depth and constraining the maximal width to 10 qubits
Output:
Output:
Change the quantum model constraint to treat the second scenario for optimizing over depth and constraining the maximal width to 12 qubits:
Output:
Output: