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

Synthesis of a stabilizer state for LNN connectivity #9734

Merged
merged 13 commits into from
Apr 4, 2023

Conversation

ShellyGarion
Copy link
Member

@ShellyGarion ShellyGarion commented Mar 5, 2023

Summary

#9036

Synthesis of a stabilizer state preparation.
Based on the Clifford layered synthesis, it requires only the layers H2 - S1 - CZ1 - H1,
so for linear nearest neighbor (LNN) connectivity it has 2q depth 2n+2.

Details and comments

  • synth_stabilizer_layers - a general synthesis of a StabilizerState into layers
  • synth_stabilizer_depth_lnn - synthesis of a StabilizerState for LNN connectivity in depth 2n+2

Co-authored by: @alexanderivrii

@ShellyGarion ShellyGarion requested review from a team and alexanderivrii as code owners March 5, 2023 12:00
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

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

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Mar 5, 2023

Pull Request Test Coverage Report for Build 4604320027

  • 62 of 64 (96.88%) changed or added relevant lines in 3 files are covered.
  • 1914 unchanged lines in 127 files lost coverage.
  • Overall coverage increased (+0.04%) to 85.398%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/synthesis/stabilizer/stabilizer_decompose.py 59 61 96.72%
Files with Coverage Reduction New Missed Lines %
qiskit/algorithms/amplitude_amplifiers/amplification_problem.py 1 84.72%
qiskit/algorithms/amplitude_amplifiers/amplitude_amplifier.py 1 94.0%
qiskit/algorithms/eigen_solvers/eigen_solver.py 1 97.78%
qiskit/algorithms/evolvers/real_evolver.py 1 92.31%
qiskit/algorithms/phase_estimators/phase_estimation_result.py 1 96.36%
qiskit/algorithms/time_evolvers/variational/var_qite.py 1 94.74%
qiskit/circuit/add_control.py 1 97.2%
qiskit/circuit/library/arithmetic/adders/vbe_ripple_carry_adder.py 1 98.55%
qiskit/circuit/library/standard_gates/p.py 1 98.9%
qiskit/opflow/primitive_ops/pauli_sum_op.py 1 86.63%
Totals Coverage Status
Change from base Build 4332358082: 0.04%
Covered Lines: 67385
Relevant Lines: 78907

💛 - Coveralls

@ShellyGarion ShellyGarion changed the title [WIP] Syntheis of a stabilizer state for LNN connectivity [WIP] Synthesis of a stabilizer state for LNN connectivity Mar 5, 2023
Copy link
Contributor

@alexanderivrii alexanderivrii left a comment

Choose a reason for hiding this comment

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

Thanks. This looks good and clean. My only suggestion was to implement stabilizer synthesis more directly.

@ShellyGarion ShellyGarion changed the title [WIP] Synthesis of a stabilizer state for LNN connectivity Synthesis of a stabilizer state for LNN connectivity Mar 8, 2023
@ShellyGarion ShellyGarion added synthesis Changelog: New Feature Include in the "Added" section of the changelog labels Mar 8, 2023
@ShellyGarion ShellyGarion added this to the 0.24.0 milestone Mar 8, 2023
Copy link
Contributor

@alexanderivrii alexanderivrii left a comment

Choose a reason for hiding this comment

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

Sorry for the delay on this. The main comment is that we can avoid doing the full Clifford synthesis (and in particular avoid calling _decompose_hadamard_free), which would make the implementation both faster and more robust.

qiskit/synthesis/clifford/__init__.py Outdated Show resolved Hide resolved
test/python/synthesis/test_stabilizer_synthesis.py Outdated Show resolved Hide resolved
Copy link
Contributor

@alexanderivrii alexanderivrii left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for doing all these changes.

@alexanderivrii alexanderivrii added this pull request to the merge queue Apr 4, 2023
Merged via the queue into Qiskit:main with commit 93ab1f9 Apr 4, 2023
giacomoRanieri pushed a commit to giacomoRanieri/qiskit-terra that referenced this pull request Apr 16, 2023
* minor

* add synthesis of a stabilizer state into layers

* add a test of StabilizerState decomposition

* add stabilizer state synthesis for LNN connectivity and tests

* updates following review comments

* add documentation

* minor update

* add release notes

* minor update

* add a test for a reduced inverse Clifford

* improved stabilizer synthesis.

Co-authored-by: alexi@il.ibm.com

* minor updates following review

* combining tests
king-p3nguin pushed a commit to king-p3nguin/qiskit-terra that referenced this pull request May 22, 2023
* minor

* add synthesis of a stabilizer state into layers

* add a test of StabilizerState decomposition

* add stabilizer state synthesis for LNN connectivity and tests

* updates following review comments

* add documentation

* minor update

* add release notes

* minor update

* add a test for a reduced inverse Clifford

* improved stabilizer synthesis.

Co-authored-by: alexi@il.ibm.com

* minor updates following review

* combining tests
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.

4 participants