Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conjugate reduction in optimize annotated pass #11811

Merged
merged 17 commits into from
May 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
release notes
  • Loading branch information
alexanderivrii committed Feb 15, 2024
commit da484a4c8a6d57e7c3dd67f2c8314c6182368dcf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
features:
- |
Added a new reduction to the :class:`.OptimizeAnnotated` transpiler pass.
This reduction looks for annotated operations (objects of type :class:`.AnnotatedOperation`
that consist of a base operation ``B`` and a list ``M`` of control, inverse and power
modifiers) with the following properties:

* the base operation needs to be synthesized (i.e. it's not already supported
by the target or belongs to the equivalence library)

* the definition circuit for``B`` can be expressed as ``P -- Q -- R`` with :math:`R = P^{-1}`

In this case the modifiers can moved to the ``Q``-part only. As a specific example, controlled
QFT-based adders have the form ``control - [QFT -- U -- IQFT]``, which can be simplified to
``QFT -- control-[U] -- IQFT. By removing the controls over ``QFT`` and ``IQFT`` parts of the
circuit, one obtains significantly fewer gates in the transpiled circuit.