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

Deprecate qiskit/transpiler/synthesis and move to qiskit/synthesis #11426

Merged
merged 39 commits into from
Jan 23, 2024

Conversation

ShellyGarion
Copy link
Member

@ShellyGarion ShellyGarion commented Dec 18, 2023

Summary

co-authored by @prakharb10
This PR replaces PR #11079 of @prakharb10 which was not completed.

Deprecate qiskit/transpiler/synthesis and move files to qiskit/synthesis

  • qiskit/transpiler/synthesis/aqc moved to qiskit/synthesis/unitary/aqc (except of aqc_plugin)
  • qiskit/transpiler/synthesis/aqc/aqc_plugin moved to qiskit/transpiler/passes/synthesis
  • qiskit/transpiler/synthesis/graysynth moved to qiskit/synthesis/linear_phase/synth_cnot_phase_aam
  • qiskit/transpiler/synthesis/cnot_synth moved to qiskit/synthesis/linear/synth_cnot_count_full_pmh

Details and comments

Close #10819
Also partly handles the following issues:
#4311
#4699
#9667
#7986

@ShellyGarion ShellyGarion added the Changelog: Deprecation Include in "Deprecated" section of changelog label Dec 18, 2023
@ShellyGarion ShellyGarion added this to the 0.46.0 milestone Dec 18, 2023
@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 Dec 18, 2023

Pull Request Test Coverage Report for Build 7614139856

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.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 89.508%

Totals Coverage Status
Change from base Build 7539167186: 0.1%
Covered Lines: 59493
Relevant Lines: 66467

💛 - Coveralls

@ShellyGarion ShellyGarion changed the title Deprecate qiskit/transpiler/synthesis and move to qiskit/synthesis [WIP] Deprecate qiskit/transpiler/synthesis and move to qiskit/synthesis Dec 18, 2023
@ShellyGarion
Copy link
Member Author

Like the deprecation of qiskit.extensions in #10725, I deprecated the qiskit.transpiler.synthesis.aqc module by putting a deprecation warning in the __init__ file, and adding links to the new location in qiskit.synthesis.unitary.aqc. Is it enough?

@ShellyGarion ShellyGarion changed the title [WIP] Deprecate qiskit/transpiler/synthesis and move to qiskit/synthesis Deprecate qiskit/transpiler/synthesis and move to qiskit/synthesis Dec 27, 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.

I only have small comments on the docs, otherwise everything LGTM!

Unitary Synthesis
=================

The Approximate Quantum Compiler is available here: :mod:qiskit.synthesis.unitary.aqc
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The Approximate Quantum Compiler is available here: :mod:qiskit.synthesis.unitary.aqc
The Approximate Quantum Compiler is available here: :mod:`qiskit.synthesis.unitary.aqc`

Copy link
Contributor

Choose a reason for hiding this comment

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

Currently the AQC docs live under the builtin transpiler plugins as only object. Would it make sense to put them with the Solovay Kitaev docs? I also don't quite understand the "builtin transpiler plugin" page, aren't there a lot more builtin plugins than AQC?

Copy link
Member Author

Choose a reason for hiding this comment

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

@Cryoris - thanks for the detailed review!
I think that the AQCSynthesisPlugin also appears now with the other synthesis plugins here:
https://docs.quantum.ibm.com/api/qiskit/transpiler_passes#synthesis

@Cryoris Cryoris added the stable backport potential The bug might be minimal and/or import enough to be port to stable label Jan 23, 2024
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.

LGTM, let's update the docs structure separately 👍🏻

@Cryoris Cryoris added this pull request to the merge queue Jan 23, 2024
Merged via the queue into Qiskit:main with commit 937ca5b Jan 23, 2024
12 checks passed
mergify bot pushed a commit that referenced this pull request Jan 23, 2024
…11426)

* deprecate transpiler/synthesis/graysynth.py

* style

* style

* move aqc_plugin to qiskit/transpiler/passes/synthesis

* remove code from qiskit/transpiler/synthesis/aqc/aqc_plugin.py

* copy qiskit/transpiler/synthesis/aqc to qiskit/synthesis/unitary

* move tests from test/python/transpiler/aqc to test/python/synthesis/aqc

* update imports in aqc_plugin

* add deprecation warning to AQC module

* handle cyclic imports

* handle cyclic imports

* update link in docs

* update init in qiskit/transpiler/synthesis/aqc

* style

* temporary remove deprecation warning test

* remove files from qiskit/transpiler/synthesis/aqc

* update link in test

* add release notes

* update docs

* update docs/apidocs/synthesis_aqc.rst

* add deprecations to qiskit/transpiler/synthesis/__init__.py

* fix link

* improve docs following review

* update docs

* add aqc to synthesis docs after review

* update qiskit/transpiler/synthesis/aqc/__init__.py after review

* update pending deprecation to deprecation in release notes

* handle cyclic imports

* update qiskit/synthesis docs following docs error

* another attempt to add AQC to synthesis docs

* another attempt to add AQC to the docs

* Revert "another attempt to add AQC to the docs"

This reverts commit 25f93ca.

* Revert "another attempt to add AQC to synthesis docs"

This reverts commit 9e87164.

* add a deprecation test for AQC

* minor

(cherry picked from commit 937ca5b)

# Conflicts:
#	pyproject.toml
#	qiskit/synthesis/__init__.py
#	qiskit/transpiler/passes/synthesis/aqc_plugin.py
Cryoris added a commit to Cryoris/qiskit-terra that referenced this pull request Jan 23, 2024
Cryoris added a commit to Cryoris/qiskit-terra that referenced this pull request Jan 23, 2024
…iskit#11426)

* deprecate transpiler/synthesis/graysynth.py

* style

* style

* move aqc_plugin to qiskit/transpiler/passes/synthesis

* remove code from qiskit/transpiler/synthesis/aqc/aqc_plugin.py

* copy qiskit/transpiler/synthesis/aqc to qiskit/synthesis/unitary

* move tests from test/python/transpiler/aqc to test/python/synthesis/aqc

* update imports in aqc_plugin

* add deprecation warning to AQC module

* handle cyclic imports

* handle cyclic imports

* update link in docs

* update init in qiskit/transpiler/synthesis/aqc

* style

* temporary remove deprecation warning test

* remove files from qiskit/transpiler/synthesis/aqc

* update link in test

* add release notes

* update docs

* update docs/apidocs/synthesis_aqc.rst

* add deprecations to qiskit/transpiler/synthesis/__init__.py

* fix link

* improve docs following review

* update docs

* add aqc to synthesis docs after review

* update qiskit/transpiler/synthesis/aqc/__init__.py after review

* update pending deprecation to deprecation in release notes

* handle cyclic imports

* update qiskit/synthesis docs following docs error

* another attempt to add AQC to synthesis docs

* another attempt to add AQC to the docs

* Revert "another attempt to add AQC to the docs"

This reverts commit 25f93ca.

* Revert "another attempt to add AQC to synthesis docs"

This reverts commit 9e87164.

* add a deprecation test for AQC

* minor
Cryoris added a commit to Cryoris/qiskit-terra that referenced this pull request Jan 23, 2024
…iskit#11426)

* deprecate transpiler/synthesis/graysynth.py

* style

* style

* move aqc_plugin to qiskit/transpiler/passes/synthesis

* remove code from qiskit/transpiler/synthesis/aqc/aqc_plugin.py

* copy qiskit/transpiler/synthesis/aqc to qiskit/synthesis/unitary

* move tests from test/python/transpiler/aqc to test/python/synthesis/aqc

* update imports in aqc_plugin

* add deprecation warning to AQC module

* handle cyclic imports

* handle cyclic imports

* update link in docs

* update init in qiskit/transpiler/synthesis/aqc

* style

* temporary remove deprecation warning test

* remove files from qiskit/transpiler/synthesis/aqc

* update link in test

* add release notes

* update docs

* update docs/apidocs/synthesis_aqc.rst

* add deprecations to qiskit/transpiler/synthesis/__init__.py

* fix link

* improve docs following review

* update docs

* add aqc to synthesis docs after review

* update qiskit/transpiler/synthesis/aqc/__init__.py after review

* update pending deprecation to deprecation in release notes

* handle cyclic imports

* update qiskit/synthesis docs following docs error

* another attempt to add AQC to synthesis docs

* another attempt to add AQC to the docs

* Revert "another attempt to add AQC to the docs"

This reverts commit 25f93ca.

* Revert "another attempt to add AQC to synthesis docs"

This reverts commit 9e87164.

* add a deprecation test for AQC

* minor

Co-authored-by: Shelly Garion <[email protected]>
@Cryoris Cryoris removed the stable backport potential The bug might be minimal and/or import enough to be port to stable label Jan 23, 2024
@Cryoris
Copy link
Contributor

Cryoris commented Jan 23, 2024

@Mergifyio backport stable/0.46

Copy link
Contributor

mergify bot commented Jan 23, 2024

backport stable/0.46

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jan 23, 2024
…11426)

* deprecate transpiler/synthesis/graysynth.py

* style

* style

* move aqc_plugin to qiskit/transpiler/passes/synthesis

* remove code from qiskit/transpiler/synthesis/aqc/aqc_plugin.py

* copy qiskit/transpiler/synthesis/aqc to qiskit/synthesis/unitary

* move tests from test/python/transpiler/aqc to test/python/synthesis/aqc

* update imports in aqc_plugin

* add deprecation warning to AQC module

* handle cyclic imports

* handle cyclic imports

* update link in docs

* update init in qiskit/transpiler/synthesis/aqc

* style

* temporary remove deprecation warning test

* remove files from qiskit/transpiler/synthesis/aqc

* update link in test

* add release notes

* update docs

* update docs/apidocs/synthesis_aqc.rst

* add deprecations to qiskit/transpiler/synthesis/__init__.py

* fix link

* improve docs following review

* update docs

* add aqc to synthesis docs after review

* update qiskit/transpiler/synthesis/aqc/__init__.py after review

* update pending deprecation to deprecation in release notes

* handle cyclic imports

* update qiskit/synthesis docs following docs error

* another attempt to add AQC to synthesis docs

* another attempt to add AQC to the docs

* Revert "another attempt to add AQC to the docs"

This reverts commit 25f93ca.

* Revert "another attempt to add AQC to synthesis docs"

This reverts commit 9e87164.

* add a deprecation test for AQC

* minor

(cherry picked from commit 937ca5b)

# Conflicts:
#	pyproject.toml
#	qiskit/synthesis/__init__.py
#	qiskit/transpiler/passes/synthesis/aqc_plugin.py
github-merge-queue bot pushed a commit that referenced this pull request Jan 24, 2024
…ackport #11426) (#11624)

* Deprecate qiskit/transpiler/synthesis and move to qiskit/synthesis (#11426)

* deprecate transpiler/synthesis/graysynth.py

* style

* style

* move aqc_plugin to qiskit/transpiler/passes/synthesis

* remove code from qiskit/transpiler/synthesis/aqc/aqc_plugin.py

* copy qiskit/transpiler/synthesis/aqc to qiskit/synthesis/unitary

* move tests from test/python/transpiler/aqc to test/python/synthesis/aqc

* update imports in aqc_plugin

* add deprecation warning to AQC module

* handle cyclic imports

* handle cyclic imports

* update link in docs

* update init in qiskit/transpiler/synthesis/aqc

* style

* temporary remove deprecation warning test

* remove files from qiskit/transpiler/synthesis/aqc

* update link in test

* add release notes

* update docs

* update docs/apidocs/synthesis_aqc.rst

* add deprecations to qiskit/transpiler/synthesis/__init__.py

* fix link

* improve docs following review

* update docs

* add aqc to synthesis docs after review

* update qiskit/transpiler/synthesis/aqc/__init__.py after review

* update pending deprecation to deprecation in release notes

* handle cyclic imports

* update qiskit/synthesis docs following docs error

* another attempt to add AQC to synthesis docs

* another attempt to add AQC to the docs

* Revert "another attempt to add AQC to the docs"

This reverts commit 25f93ca.

* Revert "another attempt to add AQC to synthesis docs"

This reverts commit 9e87164.

* add a deprecation test for AQC

* minor

(cherry picked from commit 937ca5b)

# Conflicts:
#	pyproject.toml
#	qiskit/synthesis/__init__.py
#	qiskit/transpiler/passes/synthesis/aqc_plugin.py

* Fix merge conflicts

* add pylint disable cyclic import

* remove Optimizer from aqc

* Revert "remove Optimizer from aqc"

This reverts commit 63d1ca2.

* handle cyclic imoports in AQC

* fix plugin entry point

---------

Co-authored-by: Shelly Garion <[email protected]>
Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: Shelly Garion <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Deprecation Include in "Deprecated" section of changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate qiskit/transpiler/graysynth.py
4 participants