Skip to content

[Demo] Add: Unitary synthesis with recursive KAK decompositions #1372

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

Merged
merged 50 commits into from
May 30, 2025

Conversation

dwierichs
Copy link
Contributor

@dwierichs dwierichs commented May 19, 2025

Title:
Unitary synthesis with recursive KAK decompositions

Summary:
Unitary synthesis, the process of compiling a unitary matrix into a quantum circuit, has been a topic of study for over
25 years. Three interesting techniques for unitary synthesis, namely the first, the (probably) most widely known, and the minimal-CNOT-count ("the best"), all use the same recursive KAK decomposition under the hood, as we recently
elaborated in a paper.

This demo builds on our demo on KAK decompositions (added in #1227) and explains how such decompositions can be applied recursively to construct a many-qubit circuit and how the three mentioned techniques all are powered by the same recursion.
It defers some optimization details to the literature but provides a brief gate count overview and showcases a simplified numerical implementation of all three techniques.

Relevant references:
Quite a few, see metadata file.

Possible Drawbacks:
N/A

Related GitHub Issues:

[sc-87548]

To do

  • Redo circuit diagrams
  • Add .tex files to repo
  • add examples/code

If you are writing a demonstration, please answer these questions to facilitate the marketing process.

  • GOALS — Why are we working on this now?
  • AUDIENCE — Who is this for?
  • Researchers in quantum compilation and quantum information
  • Practicioners that want to learn where the complexity of their operations comes from
  • KEYWORDS — What words should be included in the marketing post?
  • (Recursive) KAK decomposition
  • Quantum Shannon decomposition
  • Block-ZXZ decomposition
  • Unitary synthesis
  • Compilation
  • Which of the following types of documentation is most similar to your file?
    (more details here)
  • Tutorial
  • Demo
  • How-to

@dwierichs dwierichs marked this pull request as draft May 19, 2025 13:40
Copy link

👋 Hey, looks like you've updated some demos!

🐘 Don't forget to update the dateOfLastModification in the associated metadata files so your changes are reflected in Glass Onion (search and recommendations).

Please hide this comment once the field(s) are updated. Thanks!

@dwierichs dwierichs requested a review from Qottmann May 20, 2025 12:24
@dwierichs dwierichs marked this pull request as ready for review May 20, 2025 12:33
Copy link

github-actions bot commented May 20, 2025

Thank you for opening this pull request.

You can find the built site at this link.

Deployment Info:

  • Pull Request ID: 1372
  • Deployment SHA: 2eafab5edf9899ed4c60fd18b393b356de0b2045
    (The Deployment SHA refers to the latest commit hash the docs were built from)

Note: It may take several minutes for updates to this pull request to be reflected on the deployed site.

Copy link
Collaborator

@Qottmann Qottmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First look and this looks great, learned a lot !

I think in the first part some numerical or analytic examples could help

I dont know how much you planned for the gate counts, stating the logic of counting and then the results should be sufficient imo but feel free to go wild 😆 🚀

@dwierichs dwierichs requested review from Qottmann May 22, 2025 16:00
@Qottmann
Copy link
Collaborator

No preview :(

TypeError: In-place matrix multiplication is not (yet) supported. Use 'a = a @ b' instead of 'a @= b'.

dwierichs and others added 4 commits May 30, 2025 09:04
Copy link
Collaborator

@Qottmann Qottmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty happy with this now :) thanks for adding the diagrams, I think they make a huge difference!

@dwierichs dwierichs enabled auto-merge (squash) May 30, 2025 20:22
@dwierichs dwierichs merged commit 500ff44 into master May 30, 2025
10 checks passed
@dwierichs dwierichs deleted the unitary-synthesis-kak branch May 30, 2025 20:22
dwierichs added a commit that referenced this pull request Jun 3, 2025
I used nested formatting in reference links in #1372.
ReST does not support this.
Here we remove the nested formatting (and adjust two small wordings that
struck me as suboptimal upon re-reading)

---------

Co-authored-by: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants