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

Clifford+T Decomposition Transform #4802

Merged
merged 78 commits into from Dec 7, 2023

Conversation

obliviateandsurrender
Copy link
Contributor

Context: Transform to perform Clifford+T decomposition

Description of the Change: Unrolls the circuit into Clifford+Rotation basis and then uses the Solovay-Kitaev algorithm for approximating arbitrary z-rotations.

Benefits: Allows one to transform any random circuit to a Clifford+Phase basis.

Possible Drawbacks: Might be sub-optimal

Related GitHub Issues:

Copy link
Contributor

github-actions bot commented Nov 7, 2023

Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md with:

  • A one-to-two sentence description of the change. You may include a small working example for new features.
  • A link back to this PR.
  • Your name (or GitHub username) in the contributors section.

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (49b0b71) 99.66% compared to head (62599db) 99.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4802      +/-   ##
==========================================
- Coverage   99.66%   99.66%   -0.01%     
==========================================
  Files         387      388       +1     
  Lines       35078    35019      -59     
==========================================
- Hits        34961    34901      -60     
- Misses        117      118       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

timmysilv and others added 9 commits November 14, 2023 13:29
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@users.noreply.github.com>
…_transform

# Conflicts:
#	doc/releases/changelog-dev.md
#	pennylane/transforms/__init__.py
#	pennylane/transforms/decompositions/__init__.py
#	pennylane/transforms/decompositions/clifford_t/__init__.py
#	pennylane/transforms/decompositions/clifford_t/solovay_kitaev.py
#	tests/transforms/test_clifford_t/test_solovay_kitaev.py
@timmysilv timmysilv changed the base branch from master to solovay_kitaev_decompose November 20, 2023 15:28
@timmysilv
Copy link
Contributor

ps: just merge the SK branch into this one, and changed this one's base to the SK branch. just so I can work on this before merging SK without worry.

Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Thanks @obliviateandsurrender @timmysilv! No major bottlenecks from my side. My main concern now is performance, it's a little slow for very small circuits and takes a very long time for more complex things like StronglyEntanglingLayers. Have we run a quick benchmark to see what's the most time consuming part?

Copy link
Contributor Author

@obliviateandsurrender obliviateandsurrender left a comment

Choose a reason for hiding this comment

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

Looking at the benchmarks, I think little can be done quickly about the performance in this PR. It would require some extra effort that we can aim for in a future PR.

Copy link
Contributor

@trbromley trbromley left a comment

Choose a reason for hiding this comment

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

Thanks @obliviateandsurrender @timmysilv! It's great to have this capability available 🎉 🎊

Next step is to make this decomposition, and specs, more performant, as these are useful in resource estimation.

@trbromley trbromley mentioned this pull request Dec 7, 2023
@obliviateandsurrender obliviateandsurrender merged commit dcd1201 into master Dec 7, 2023
35 checks passed
@obliviateandsurrender obliviateandsurrender deleted the clifford_t_decomposition_transform branch December 7, 2023 22:42
mudit2812 pushed a commit that referenced this pull request Jan 19, 2024
Context: Transform to perform Clifford+T decomposition

Description of the Change: Unrolls the circuit into Clifford+Rotation
basis and then uses the Solovay-Kitaev algorithm for approximating
arbitrary z-rotations.

Benefits: Allows one to transform any random circuit to a Clifford+Phase
basis.

Possible Drawbacks: Might be sub-optimal

Related GitHub Issues:

---------

Co-authored-by: Matthew Silverman <matthews@xanadu.ai>
Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com>
Co-authored-by: soranjh <40344468+soranjh@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.

None yet

4 participants