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

QFT circuit synthesis for linear nearest neighbor connectivity #11236

Merged
merged 11 commits into from Dec 8, 2023

Conversation

ShellyGarion
Copy link
Member

Summary

#9036

Synthesis of QFT circuits for linear nearest neighbor connectivity
based on Fowler et al, Fig 2.b from https://arxiv.org/abs/quant-ph/0402196

Details and comments

@qiskit-bot
Copy link
Collaborator

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Nov 13, 2023

Pull Request Test Coverage Report for Build 7083208146

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 29 of 29 (100.0%) changed or added relevant lines in 3 files are covered.
  • 727 unchanged lines in 70 files lost coverage.
  • Overall coverage increased (+1.6%) to 87.454%

Files with Coverage Reduction New Missed Lines %
qiskit/circuit/classical/types/types.py 1 96.43%
qiskit/circuit/controlflow/control_flow.py 1 95.0%
qiskit/circuit/controlflow/for_loop.py 1 98.55%
qiskit/circuit/controlflow/while_loop.py 1 98.18%
qiskit/circuit/library/generalized_gates/pauli.py 1 91.18%
qiskit/circuit/parameter.py 1 98.31%
qiskit/circuit/parametertable.py 1 87.4%
qiskit/converters/circuit_to_instruction.py 1 97.67%
qiskit/exceptions.py 1 92.31%
qiskit/providers/backend_compat.py 1 86.05%
Totals Coverage Status
Change from base Build 6911016807: 1.6%
Covered Lines: 59955
Relevant Lines: 68556

💛 - Coveralls

@ShellyGarion
Copy link
Member Author

ShellyGarion commented Nov 16, 2023

Here are some performance benchmarks done with @alexanderivrii (on ibm_brisbane device)

10-qubit QFT circuits:

Original QFT code (do_swaps=False)
Transpiled using Qiskit: depth = 523, count-2q = 172, depth-2q = 111
Transpiler using TKet:   depth = 323, count-2q = 169, depth-2q = 91
QFT-LNN code (do_swaps = True)
Transpiled using Qiskit: depth = 252, count-2q = 135, depth-2q = 51
Transpiler using TKet:   depth = 269, count-2q = 149, depth-2q = 77

50-qubit QFT circuits:

Original QFT code (do_swaps=False)
Transpiled using Qiskit: depth = 4552, count-2q = 4940, depth-2q = 951
Transpiler using TKet:   depth = 3040, count-2q = 4267, depth-2q = 910
QFT-LNN code (do_swaps = True)
Transpiled using Qiskit: depth = 1458, count-2q = 3675, depth-2q = 291
Transpiler using TKet:   depth = 3036, count-2q = 4265, depth-2q = 910

@ShellyGarion ShellyGarion changed the title [WIP] QFT circuit synthesis for linear nearest neighbor connectivity QFT circuit synthesis for linear nearest neighbor connectivity Nov 22, 2023
Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

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

Some minor comments, otherwise looks good!

releasenotes/notes/qft_lnn_synthesis-c917dc00c3a8cabc.yaml Outdated Show resolved Hide resolved
test/python/synthesis/test_qft_synthesis.py Outdated Show resolved Hide resolved
test/python/synthesis/test_qft_synthesis.py Outdated Show resolved Hide resolved
test/python/synthesis/test_qft_synthesis.py Outdated Show resolved Hide resolved
qiskit/synthesis/qft/qft_decompose_lnn.py Show resolved Hide resolved
qiskit/synthesis/qft/qft_decompose_lnn.py Outdated Show resolved Hide resolved
qiskit/synthesis/qft/qft_decompose_lnn.py Outdated Show resolved Hide resolved
qiskit/synthesis/qft/qft_decompose_lnn.py Outdated Show resolved Hide resolved
qiskit/synthesis/qft/qft_decompose_lnn.py Outdated Show resolved Hide resolved
qiskit/synthesis/qft/qft_decompose_lnn.py Outdated Show resolved Hide resolved
test/python/synthesis/test_qft_synthesis.py Outdated Show resolved Hide resolved
@Cryoris
Copy link
Contributor

Cryoris commented Dec 3, 2023

LGTM, just left some tiny comments above. The one thing I'm still not quite understanding is how this has the approximately same number of gates as the tket example but is way shallower. But as long as the synthesis is correct I guess that's good 🙂

@Cryoris Cryoris added the Changelog: New Feature Include in the "Added" section of the changelog label Dec 4, 2023
@Cryoris Cryoris added this pull request to the merge queue Dec 8, 2023
Merged via the queue into Qiskit:main with commit 523ea74 Dec 8, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog synthesis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants