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

Add decomposition for gates.FSWAP #1093

Merged
merged 3 commits into from
Nov 18, 2023
Merged

Add decomposition for gates.FSWAP #1093

merged 3 commits into from
Nov 18, 2023

Conversation

renatomello
Copy link
Contributor

@renatomello renatomello commented Nov 15, 2023

Checklist:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.

@renatomello renatomello added the enhancement New feature or request label Nov 15, 2023
@renatomello renatomello added this to the Qibo 0.2.3 milestone Nov 15, 2023
@renatomello renatomello self-assigned this Nov 15, 2023
Copy link

codecov bot commented Nov 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4fbe5ae) 100.00% compared to head (104229f) 100.00%.
Report is 4 commits behind head on master.

❗ Current head 104229f differs from pull request most recent head cea634d. Consider uploading reports for the commit cea634d to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #1093   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           63        63           
  Lines         8862      8860    -2     
=========================================
- Hits          8862      8860    -2     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@BrunoLiegiBastonLiegi BrunoLiegiBastonLiegi left a comment

Choose a reason for hiding this comment

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

Thanks @renatomello, looks good.

Copy link
Member

@stavros11 stavros11 left a comment

Choose a reason for hiding this comment

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

Thanks @renatomello. This is fine with me, just wanted to mention that now that we have the transpiler in qibo, we should consider moving the Gate.decompose method to the Unroller interface. The main idea behind this was that we can have different Unrollers for different applications. For example the FSWAP may be decomposed to a set of GPI2 and CZ for the hardware, but a different decomposition for some other application (if that makes sense and is useful).

That is of course if you and @BrunoLiegiBastonLiegi agree, but it is quite clear that the decompose does the same thing with the Unroller and I would rather focus on improving one approach than trying to maintain two competing ones. If you have suggestions to improve the transpiler these are also welcome.

@renatomello
Copy link
Contributor Author

Thanks @renatomello. This is fine with me, just wanted to mention that now that we have the transpiler in qibo, we should consider moving the Gate.decompose method to the Unroller interface. The main idea behind this was that we can have different Unrollers for different applications. For example the FSWAP may be decomposed to a set of GPI2 and CZ for the hardware, but a different decomposition for some other application (if that makes sense and is useful).

That is of course if you and @BrunoLiegiBastonLiegi agree, but it is quite clear that the decompose does the same thing with the Unroller and I would rather focus on improving one approach than trying to maintain two competing ones. If you have suggestions to improve the transpiler these are also welcome.

Yeah I agree we should concentrate decompositions on the transpiler. This one is being done so @BrunoLiegiBastonLiegi can move forward with the Clifford simulator in #1076 and also it can serve as a benchmark for any unroller.

@renatomello renatomello merged commit 7f9f663 into master Nov 18, 2023
19 checks passed
@renatomello renatomello deleted the fswap_decomposition branch November 18, 2023 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants