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

Move qiskit.test.mock to qiskit.providers.fake_provider and deprecate #8121

Merged
merged 73 commits into from
Jun 23, 2022
Merged

Move qiskit.test.mock to qiskit.providers.fake_provider and deprecate #8121

merged 73 commits into from
Jun 23, 2022

Conversation

HuangJunye
Copy link
Collaborator

@HuangJunye HuangJunye commented May 31, 2022

Summary

In #7437 we began the process of moving the features in qiskit.test.mock to qiskit.providers.fake_provider, by making them accessible at the new name. The PR official move the files inside the folders to the new location and adds deprecation warnings.

Fixes #7738
Related to #6862

Details and comments

To do

  • all our internal uses point to the new names
    • ibmq_mock => unsure
    • qiskit.test.mock => qiskit.providers.fake_provider
    • qiskit.test.mock.xxx => qiskit.providers.fake_provider
    • qiskit.test.mock.utils => qiskit.providers.fake_provider.utils
    • merge multiple imports from qiskit.providrs.fake_provider
    • FakeBackendV2 from fake_backend_v2 clashes with FakeBackendV2 from fake_backend
      • make sure fake_backend_v2 are not availabe in the fake_provider.initi.py
    • redirect imports in fake_provider.init.py
    • redirect imports in mock.init.py
  • release note: jupyter-execute => code block
  • add deprecation warnings
  • move files
  • organize imports
  • Write tests
  • Move tests in mock folder
    • double check the tests. May remove test_new_qasm_backends.py and test_new_pulse_backends.py
  • Write release notes
  • Use relative import
  • Improve documentation on fake_provider.init.py

Questions

  • Change words "Mock" to "Fake" in various files? Such as in the docstring of fake backends.
  • Use relative import?

Future issues

Future documentation issues

  • fake backends docstrings
    • Unify title
    • Fix coupling map rendering issue
    • Add coupling maps to all fake backends

Documentation screenshot

image

@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:

@HuangJunye HuangJunye marked this pull request as draft May 31, 2022 16:44
@coveralls
Copy link

coveralls commented May 31, 2022

Pull Request Test Coverage Report for Build 2546139012

  • 321 of 661 (48.56%) changed or added relevant lines in 141 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.4%) to 83.944%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/tools/jupyter/init.py 0 1 0.0%
qiskit/tools/jupyter/backend_monitor.py 0 1 0.0%
qiskit/test/ibmq_mock.py 0 2 0.0%
qiskit/test/mock/backends/almaden/init.py 0 8 0.0%
qiskit/test/mock/backends/armonk/init.py 0 8 0.0%
qiskit/test/mock/backends/athens/init.py 0 8 0.0%
qiskit/test/mock/backends/belem/init.py 0 8 0.0%
qiskit/test/mock/backends/boeblingen/init.py 0 8 0.0%
qiskit/test/mock/backends/bogota/init.py 0 8 0.0%
qiskit/test/mock/backends/brooklyn/init.py 0 8 0.0%
Files with Coverage Reduction New Missed Lines %
qiskit/pulse/library/waveform.py 3 89.36%
Totals Coverage Status
Change from base Build 2546137116: -0.4%
Covered Lines: 55504
Relevant Lines: 66120

💛 - Coveralls

@HuangJunye HuangJunye requested a review from jakelishman June 22, 2022 12:34
@HuangJunye
Copy link
Collaborator Author

@jakelishman I think I fixed all the coupling maps issues. At least I couldn't find any issues when building locally. Let's hope the docs build passes. Please review the PR when you have time!

Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

This looks really good, thanks a lot for all the work this entailed. To be completely consistent, we should make sure that import paths like from qiskit.test.mock.backends.hanoi import FakeHanoi work as well. It's nuisance busy-work, but let's just be safe.

I'll push a commit that does that, though - no need to worry.

qiskit/providers/fake_provider/__init__.py Outdated Show resolved Hide resolved
qiskit/providers/fake_provider/__init__.py Outdated Show resolved Hide resolved
qiskit/providers/fake_provider/__init__.py Outdated Show resolved Hide resolved
jakelishman and others added 3 commits June 22, 2022 16:56
The previous commits in this PR did not maintain the old import paths
for submodules of `qisit.test.mock`.  This re-instatates them, with
suitable deprecation warnings.  Hopefully nobody is using these anyway,
but it's better to be on the safe side.
jakelishman
jakelishman previously approved these changes Jun 22, 2022
Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Thanks for this - it was super fiddly, and you were super thorough in taking care of all of it!

@jakelishman jakelishman added Changelog: Deprecation Include in "Deprecated" section of changelog automerge labels Jun 22, 2022
@HuangJunye
Copy link
Collaborator Author

Thanks for your guidance along the way and adding the depreciation warnings to all submodules!

jakelishman
jakelishman previously approved these changes Jun 22, 2022
Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

Fixed merge conflicts.

@mergify mergify bot merged commit 3241978 into Qiskit:main Jun 23, 2022
ElePT pushed a commit to ElePT/qiskit that referenced this pull request Jun 27, 2023
…cate (Qiskit#8121)

* redirect imports from qiskit.test.mock to qiskit.providers.fake_provider

* import the rest of classes in fake_backend_v2 to fake_provider

* redirect imports to fake_provider

Anything that can be imported from fake_provider root are imported from there instead of sub files.

* change jupyter-execute to code-block

* redirect import

* Combine multiple imports into one

* Add missing )

* move all files except __init__ from qiskit.test.mock to qiskit.providers.fake_provider

* redirect imports in fake_provider.__init__.py

* redirect imports in mock.__init__.py

* Use relative imports in fake_provider.__init__.py

* redirect .utlis imports

* Don't import fake_backend_v2.py in __init__ to avoid clashes of FakeBackendV2 names

* Match imports from the old and new __init__

* Organize imports

* black linting

* Fix FakePulseBackend import order dependency

* fix cyclic import

* move relative import after absolute import

* fix cyclic import

* Update MANIFEST.ini with new path

* add deprecation warning

* add deprecation test

* add release note

* move test files from test.python.mock to test.python.providers.fake_provider

* linting

* linting

* change deprecation warning location

* update path for tools/update_fake_backends.py

* rename docstrings

* Update ibmq_mock.py

* import back FakeBackendV2 and FakeBackend5QV2 in __init__

* Modify release note

* reformat release note

* remove unnecessary tests

These two tests were introduced in PR Qiskit#7437 to test the new imports which are not needed any more: Qiskit#7437 (comment)

* Use relative imports

* redirect import in test_schedular.py

* first draft of module level doc

* Update docstring of fake provider v1 and v2

* Update wording of module level doc

* add fake V1 and V2 backends

* Correct fake v1 and v2 backends in the list

* comment on backends that do not have V2 versions

* list special fake backends

* Add descriptions for sections

* add code example using jupyter execute

* Update code example and improve descriptions of the module

* not using fake provider before fake provider get backend name is fixed

* modify comment

* formating fix

* Remove fake backend coupling map from docstrings

* linting

* remove coupling map of Pooughkeepsie

* add qiskit-aer to tox.ini as deps for docs build

* Revert "remove coupling map of Pooughkeepsie"

This reverts commit 4560748.

* Revert "linting"

This reverts commit eddfa65.

* Revert "Remove fake backend coupling map from docstrings"

This reverts commit 3aee7a8.

* fix coupling maps

* Fix minor typos

* Issue deprecation warnings from all levels of package

The previous commits in this PR did not maintain the old import paths
for submodules of `qisit.test.mock`.  This re-instatates them, with
suitable deprecation warnings.  Hopefully nobody is using these anyway,
but it's better to be on the safe side.

* Import from the correct location

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit-algorithms-test that referenced this pull request Jul 17, 2023
…cate (Qiskit/qiskit#8121)

* redirect imports from qiskit.test.mock to qiskit.providers.fake_provider

* import the rest of classes in fake_backend_v2 to fake_provider

* redirect imports to fake_provider

Anything that can be imported from fake_provider root are imported from there instead of sub files.

* change jupyter-execute to code-block

* redirect import

* Combine multiple imports into one

* Add missing )

* move all files except __init__ from qiskit.test.mock to qiskit.providers.fake_provider

* redirect imports in fake_provider.__init__.py

* redirect imports in mock.__init__.py

* Use relative imports in fake_provider.__init__.py

* redirect .utlis imports

* Don't import fake_backend_v2.py in __init__ to avoid clashes of FakeBackendV2 names

* Match imports from the old and new __init__

* Organize imports

* black linting

* Fix FakePulseBackend import order dependency

* fix cyclic import

* move relative import after absolute import

* fix cyclic import

* Update MANIFEST.ini with new path

* add deprecation warning

* add deprecation test

* add release note

* move test files from test.python.mock to test.python.providers.fake_provider

* linting

* linting

* change deprecation warning location

* update path for tools/update_fake_backends.py

* rename docstrings

* Update ibmq_mock.py

* import back FakeBackendV2 and FakeBackend5QV2 in __init__

* Modify release note

* reformat release note

* remove unnecessary tests

These two tests were introduced in PR Qiskit/qiskit#7437 to test the new imports which are not needed any more: Qiskit/qiskit#7437 (comment)

* Use relative imports

* redirect import in test_schedular.py

* first draft of module level doc

* Update docstring of fake provider v1 and v2

* Update wording of module level doc

* add fake V1 and V2 backends

* Correct fake v1 and v2 backends in the list

* comment on backends that do not have V2 versions

* list special fake backends

* Add descriptions for sections

* add code example using jupyter execute

* Update code example and improve descriptions of the module

* not using fake provider before fake provider get backend name is fixed

* modify comment

* formating fix

* Remove fake backend coupling map from docstrings

* linting

* remove coupling map of Pooughkeepsie

* add qiskit-aer to tox.ini as deps for docs build

* Revert "remove coupling map of Pooughkeepsie"

This reverts commit 45607489303fde0e65e550f117735ec4f468ff3d.

* Revert "linting"

This reverts commit eddfa65bf6f65f076c7eff4d1a20bb251c56658b.

* Revert "Remove fake backend coupling map from docstrings"

This reverts commit 3aee7a8b57e8ea248ede0bec9db67e02dcb08eed.

* fix coupling maps

* Fix minor typos

* Issue deprecation warnings from all levels of package

The previous commits in this PR did not maintain the old import paths
for submodules of `qisit.test.mock`.  This re-instatates them, with
suitable deprecation warnings.  Hopefully nobody is using these anyway,
but it's better to be on the safe side.

* Import from the correct location

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit-ibm-provider that referenced this pull request Oct 4, 2023
…cate (Qiskit/qiskit#8121)

* redirect imports from qiskit.test.mock to qiskit.providers.fake_provider

* import the rest of classes in fake_backend_v2 to fake_provider

* redirect imports to fake_provider

Anything that can be imported from fake_provider root are imported from there instead of sub files.

* change jupyter-execute to code-block

* redirect import

* Combine multiple imports into one

* Add missing )

* move all files except __init__ from qiskit.test.mock to qiskit.providers.fake_provider

* redirect imports in fake_provider.__init__.py

* redirect imports in mock.__init__.py

* Use relative imports in fake_provider.__init__.py

* redirect .utlis imports

* Don't import fake_backend_v2.py in __init__ to avoid clashes of FakeBackendV2 names

* Match imports from the old and new __init__

* Organize imports

* black linting

* Fix FakePulseBackend import order dependency

* fix cyclic import

* move relative import after absolute import

* fix cyclic import

* Update MANIFEST.ini with new path

* add deprecation warning

* add deprecation test

* add release note

* move test files from test.python.mock to test.python.providers.fake_provider

* linting

* linting

* change deprecation warning location

* update path for tools/update_fake_backends.py

* rename docstrings

* Update ibmq_mock.py

* import back FakeBackendV2 and FakeBackend5QV2 in __init__

* Modify release note

* reformat release note

* remove unnecessary tests

These two tests were introduced in PR Qiskit/qiskit#7437 to test the new imports which are not needed any more: Qiskit/qiskit#7437 (comment)

* Use relative imports

* redirect import in test_schedular.py

* first draft of module level doc

* Update docstring of fake provider v1 and v2

* Update wording of module level doc

* add fake V1 and V2 backends

* Correct fake v1 and v2 backends in the list

* comment on backends that do not have V2 versions

* list special fake backends

* Add descriptions for sections

* add code example using jupyter execute

* Update code example and improve descriptions of the module

* not using fake provider before fake provider get backend name is fixed

* modify comment

* formating fix

* Remove fake backend coupling map from docstrings

* linting

* remove coupling map of Pooughkeepsie

* add qiskit-aer to tox.ini as deps for docs build

* Revert "remove coupling map of Pooughkeepsie"

This reverts commit 45607489303fde0e65e550f117735ec4f468ff3d.

* Revert "linting"

This reverts commit eddfa65bf6f65f076c7eff4d1a20bb251c56658b.

* Revert "Remove fake backend coupling map from docstrings"

This reverts commit 3aee7a8b57e8ea248ede0bec9db67e02dcb08eed.

* fix coupling maps

* Fix minor typos

* Issue deprecation warnings from all levels of package

The previous commits in this PR did not maintain the old import paths
for submodules of `qisit.test.mock`.  This re-instatates them, with
suitable deprecation warnings.  Hopefully nobody is using these anyway,
but it's better to be on the safe side.

* Import from the correct location

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit-ibm-provider that referenced this pull request Oct 9, 2023
…cate (Qiskit/qiskit#8121)

* redirect imports from qiskit.test.mock to qiskit.providers.fake_provider

* import the rest of classes in fake_backend_v2 to fake_provider

* redirect imports to fake_provider

Anything that can be imported from fake_provider root are imported from there instead of sub files.

* change jupyter-execute to code-block

* redirect import

* Combine multiple imports into one

* Add missing )

* move all files except __init__ from qiskit.test.mock to qiskit.providers.fake_provider

* redirect imports in fake_provider.__init__.py

* redirect imports in mock.__init__.py

* Use relative imports in fake_provider.__init__.py

* redirect .utlis imports

* Don't import fake_backend_v2.py in __init__ to avoid clashes of FakeBackendV2 names

* Match imports from the old and new __init__

* Organize imports

* black linting

* Fix FakePulseBackend import order dependency

* fix cyclic import

* move relative import after absolute import

* fix cyclic import

* Update MANIFEST.ini with new path

* add deprecation warning

* add deprecation test

* add release note

* move test files from test.python.mock to test.python.providers.fake_provider

* linting

* linting

* change deprecation warning location

* update path for tools/update_fake_backends.py

* rename docstrings

* Update ibmq_mock.py

* import back FakeBackendV2 and FakeBackend5QV2 in __init__

* Modify release note

* reformat release note

* remove unnecessary tests

These two tests were introduced in PR Qiskit/qiskit#7437 to test the new imports which are not needed any more: Qiskit/qiskit#7437 (comment)

* Use relative imports

* redirect import in test_schedular.py

* first draft of module level doc

* Update docstring of fake provider v1 and v2

* Update wording of module level doc

* add fake V1 and V2 backends

* Correct fake v1 and v2 backends in the list

* comment on backends that do not have V2 versions

* list special fake backends

* Add descriptions for sections

* add code example using jupyter execute

* Update code example and improve descriptions of the module

* not using fake provider before fake provider get backend name is fixed

* modify comment

* formating fix

* Remove fake backend coupling map from docstrings

* linting

* remove coupling map of Pooughkeepsie

* add qiskit-aer to tox.ini as deps for docs build

* Revert "remove coupling map of Pooughkeepsie"

This reverts commit 45607489303fde0e65e550f117735ec4f468ff3d.

* Revert "linting"

This reverts commit eddfa65bf6f65f076c7eff4d1a20bb251c56658b.

* Revert "Remove fake backend coupling map from docstrings"

This reverts commit 3aee7a8b57e8ea248ede0bec9db67e02dcb08eed.

* fix coupling maps

* Fix minor typos

* Issue deprecation warnings from all levels of package

The previous commits in this PR did not maintain the old import paths
for submodules of `qisit.test.mock`.  This re-instatates them, with
suitable deprecation warnings.  Hopefully nobody is using these anyway,
but it's better to be on the safe side.

* Import from the correct location

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit-ibm-runtime that referenced this pull request Oct 10, 2023
…cate (Qiskit/qiskit#8121)

* redirect imports from qiskit.test.mock to qiskit.providers.fake_provider

* import the rest of classes in fake_backend_v2 to fake_provider

* redirect imports to fake_provider

Anything that can be imported from fake_provider root are imported from there instead of sub files.

* change jupyter-execute to code-block

* redirect import

* Combine multiple imports into one

* Add missing )

* move all files except __init__ from qiskit.test.mock to qiskit.providers.fake_provider

* redirect imports in fake_provider.__init__.py

* redirect imports in mock.__init__.py

* Use relative imports in fake_provider.__init__.py

* redirect .utlis imports

* Don't import fake_backend_v2.py in __init__ to avoid clashes of FakeBackendV2 names

* Match imports from the old and new __init__

* Organize imports

* black linting

* Fix FakePulseBackend import order dependency

* fix cyclic import

* move relative import after absolute import

* fix cyclic import

* Update MANIFEST.ini with new path

* add deprecation warning

* add deprecation test

* add release note

* move test files from test.python.mock to test.python.providers.fake_provider

* linting

* linting

* change deprecation warning location

* update path for tools/update_fake_backends.py

* rename docstrings

* Update ibmq_mock.py

* import back FakeBackendV2 and FakeBackend5QV2 in __init__

* Modify release note

* reformat release note

* remove unnecessary tests

These two tests were introduced in PR Qiskit/qiskit#7437 to test the new imports which are not needed any more: Qiskit/qiskit#7437 (comment)

* Use relative imports

* redirect import in test_schedular.py

* first draft of module level doc

* Update docstring of fake provider v1 and v2

* Update wording of module level doc

* add fake V1 and V2 backends

* Correct fake v1 and v2 backends in the list

* comment on backends that do not have V2 versions

* list special fake backends

* Add descriptions for sections

* add code example using jupyter execute

* Update code example and improve descriptions of the module

* not using fake provider before fake provider get backend name is fixed

* modify comment

* formating fix

* Remove fake backend coupling map from docstrings

* linting

* remove coupling map of Pooughkeepsie

* add qiskit-aer to tox.ini as deps for docs build

* Revert "remove coupling map of Pooughkeepsie"

This reverts commit 45607489303fde0e65e550f117735ec4f468ff3d.

* Revert "linting"

This reverts commit eddfa65bf6f65f076c7eff4d1a20bb251c56658b.

* Revert "Remove fake backend coupling map from docstrings"

This reverts commit 3aee7a8b57e8ea248ede0bec9db67e02dcb08eed.

* fix coupling maps

* Fix minor typos

* Issue deprecation warnings from all levels of package

The previous commits in this PR did not maintain the old import paths
for submodules of `qisit.test.mock`.  This re-instatates them, with
suitable deprecation warnings.  Hopefully nobody is using these anyway,
but it's better to be on the safe side.

* Import from the correct location

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit that referenced this pull request Oct 12, 2023
…cate (Qiskit#8121)

* redirect imports from qiskit.test.mock to qiskit.providers.fake_provider

* import the rest of classes in fake_backend_v2 to fake_provider

* redirect imports to fake_provider

Anything that can be imported from fake_provider root are imported from there instead of sub files.

* change jupyter-execute to code-block

* redirect import

* Combine multiple imports into one

* Add missing )

* move all files except __init__ from qiskit.test.mock to qiskit.providers.fake_provider

* redirect imports in fake_provider.__init__.py

* redirect imports in mock.__init__.py

* Use relative imports in fake_provider.__init__.py

* redirect .utlis imports

* Don't import fake_backend_v2.py in __init__ to avoid clashes of FakeBackendV2 names

* Match imports from the old and new __init__

* Organize imports

* black linting

* Fix FakePulseBackend import order dependency

* fix cyclic import

* move relative import after absolute import

* fix cyclic import

* Update MANIFEST.ini with new path

* add deprecation warning

* add deprecation test

* add release note

* move test files from test.python.mock to test.python.providers.fake_provider

* linting

* linting

* change deprecation warning location

* update path for tools/update_fake_backends.py

* rename docstrings

* Update ibmq_mock.py

* import back FakeBackendV2 and FakeBackend5QV2 in __init__

* Modify release note

* reformat release note

* remove unnecessary tests

These two tests were introduced in PR Qiskit#7437 to test the new imports which are not needed any more: Qiskit#7437 (comment)

* Use relative imports

* redirect import in test_schedular.py

* first draft of module level doc

* Update docstring of fake provider v1 and v2

* Update wording of module level doc

* add fake V1 and V2 backends

* Correct fake v1 and v2 backends in the list

* comment on backends that do not have V2 versions

* list special fake backends

* Add descriptions for sections

* add code example using jupyter execute

* Update code example and improve descriptions of the module

* not using fake provider before fake provider get backend name is fixed

* modify comment

* formating fix

* Remove fake backend coupling map from docstrings

* linting

* remove coupling map of Pooughkeepsie

* add qiskit-aer to tox.ini as deps for docs build

* Revert "remove coupling map of Pooughkeepsie"

This reverts commit 4560748.

* Revert "linting"

This reverts commit eddfa65.

* Revert "Remove fake backend coupling map from docstrings"

This reverts commit 3aee7a8.

* fix coupling maps

* Fix minor typos

* Issue deprecation warnings from all levels of package

The previous commits in this PR did not maintain the old import paths
for submodules of `qisit.test.mock`.  This re-instatates them, with
suitable deprecation warnings.  Hopefully nobody is using these anyway,
but it's better to be on the safe side.

* Import from the correct location

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
ElePT pushed a commit to ElePT/qiskit-ibm-runtime that referenced this pull request Dec 8, 2023
…cate (Qiskit/qiskit#8121)

* redirect imports from qiskit.test.mock to qiskit.providers.fake_provider

* import the rest of classes in fake_backend_v2 to fake_provider

* redirect imports to fake_provider

Anything that can be imported from fake_provider root are imported from there instead of sub files.

* change jupyter-execute to code-block

* redirect import

* Combine multiple imports into one

* Add missing )

* move all files except __init__ from qiskit.test.mock to qiskit.providers.fake_provider

* redirect imports in fake_provider.__init__.py

* redirect imports in mock.__init__.py

* Use relative imports in fake_provider.__init__.py

* redirect .utlis imports

* Don't import fake_backend_v2.py in __init__ to avoid clashes of FakeBackendV2 names

* Match imports from the old and new __init__

* Organize imports

* black linting

* Fix FakePulseBackend import order dependency

* fix cyclic import

* move relative import after absolute import

* fix cyclic import

* Update MANIFEST.ini with new path

* add deprecation warning

* add deprecation test

* add release note

* move test files from test.python.mock to test.python.providers.fake_provider

* linting

* linting

* change deprecation warning location

* update path for tools/update_fake_backends.py

* rename docstrings

* Update ibmq_mock.py

* import back FakeBackendV2 and FakeBackend5QV2 in __init__

* Modify release note

* reformat release note

* remove unnecessary tests

These two tests were introduced in PR Qiskit/qiskit#7437 to test the new imports which are not needed any more: Qiskit/qiskit#7437 (comment)

* Use relative imports

* redirect import in test_schedular.py

* first draft of module level doc

* Update docstring of fake provider v1 and v2

* Update wording of module level doc

* add fake V1 and V2 backends

* Correct fake v1 and v2 backends in the list

* comment on backends that do not have V2 versions

* list special fake backends

* Add descriptions for sections

* add code example using jupyter execute

* Update code example and improve descriptions of the module

* not using fake provider before fake provider get backend name is fixed

* modify comment

* formating fix

* Remove fake backend coupling map from docstrings

* linting

* remove coupling map of Pooughkeepsie

* add qiskit-aer to tox.ini as deps for docs build

* Revert "remove coupling map of Pooughkeepsie"

This reverts commit 45607489303fde0e65e550f117735ec4f468ff3d.

* Revert "linting"

This reverts commit eddfa65bf6f65f076c7eff4d1a20bb251c56658b.

* Revert "Remove fake backend coupling map from docstrings"

This reverts commit 3aee7a8b57e8ea248ede0bec9db67e02dcb08eed.

* fix coupling maps

* Fix minor typos

* Issue deprecation warnings from all levels of package

The previous commits in this PR did not maintain the old import paths
for submodules of `qisit.test.mock`.  This re-instatates them, with
suitable deprecation warnings.  Hopefully nobody is using these anyway,
but it's better to be on the safe side.

* Import from the correct location

Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
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.

Move qiskit.test.mock to qiskit.providers.fake_provider and deprecate
5 participants