Skip to content

Add transpile() support for extracting instruction schedule map from BackendV2#7765

Merged
mergify[bot] merged 10 commits into
Qiskit:mainfrom
HuangJunye:add-v2-support-for-transpiler-parse-inst-map-7764
Mar 16, 2022
Merged

Add transpile() support for extracting instruction schedule map from BackendV2#7765
mergify[bot] merged 10 commits into
Qiskit:mainfrom
HuangJunye:add-v2-support-for-transpiler-parse-inst-map-7764

Conversation

@HuangJunye
Copy link
Copy Markdown
Collaborator

@HuangJunye HuangJunye commented Mar 11, 2022

Summary

BackendV2 has removed defaults attribute from backend and transpiler._parse_inst_map() needs to be updated to support BackendV2. (#7764) This PR address this issue.

To do

  • Add test
  • Add release note

Fixes #7764

Details and comments

@HuangJunye HuangJunye requested a review from a team as a code owner March 11, 2022 11:38
@mtreinish mtreinish added this to the 0.20 milestone Mar 11, 2022
@mtreinish mtreinish added the Changelog: Fixed Add a "Fixed" entry in the GitHub Release changelog. label Mar 11, 2022
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 11, 2022

Pull Request Test Coverage Report for Build 1994037564

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.002%) to 83.466%

Files with Coverage Reduction New Missed Lines %
qiskit/pulse/library/waveform.py 3 89.36%
Totals Coverage Status
Change from base Build 1993932998: -0.002%
Covered Lines: 52363
Relevant Lines: 62736

💛 - Coveralls

@HuangJunye HuangJunye mentioned this pull request Mar 14, 2022
9 tasks
@HuangJunye HuangJunye requested a review from jyu00 as a code owner March 15, 2022 11:12
@HuangJunye HuangJunye changed the title [WIP] add BackendV2 support for transpiler._parse_inst_map add BackendV2 support for transpiler._parse_inst_map Mar 15, 2022
Copy link
Copy Markdown
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

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

Overall LGTM, just a couple of small suggestions inline.

Comment thread test/python/providers/test_backend_v2.py
Comment thread test/python/providers/test_backend_v2.py Outdated
@mtreinish mtreinish changed the title add BackendV2 support for transpiler._parse_inst_map Add transpile() support for extracting instruction schedule map from BackendV2 Mar 15, 2022
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Comment thread test/python/providers/test_backend_v2.py Outdated
@mergify mergify Bot merged commit e0e7cf8 into Qiskit:main Mar 16, 2022
mergify Bot added a commit that referenced this pull request Mar 31, 2022
* Add backend converter script from Matthew

Co-Authored-By: Matthew Treinish <mtreinish@kortar.org>

* FakeBackendV2, FakeQasmBeckendV2, FakeJakartaV2 in progress

* Temporary fix for circular import

* First try of implementing FakeJakartaV2 based on FakeQasmBackendV2/FakeBackendV2

* Implement FakeQasmBackend methods into FakeBackendV2

* Implement FakePulseBackend methods into FakeBackendV2

* Import missing PulseDefaults and adjust _get_conf_from_json method position

* Adjust _get_config_from_dict method position

* Fix target property

Need to take closer look at _convert_to_target method

* Fix _default_options method

* Add FakeProviderV2 for V2 fake backends

* Remove FakeQasmBackendV2 class

* Copy run method from FakeBackendV1

* change configuration to self._configuration

* Update backend_converter.py

Based on the latest version on Qiskit/qiskit-ibm-runtime#102

Co-Authored-By: Rathish Cholarajan <rathishc24@gmail.com>

* @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target

* Add dtm

* Add qubit properties

* Add drive, measure and acquire channels.

* Fix test_fake_backends

* Fix ConfigurableFakeBackend circular import problem

* Fix configurable_backend circular import problem

* FakeAlmadenV2

* FakeArmonkV2

* FakeAthensV2

* FakeBelemV2

* FakeBoeblingenV2

* Add fake backends (except rueschlikon, tenerife and tokyo)

* import fake v2 backends in __init__.py

* add fake backends to mock.backend.__init__ and fake provider

* Fix typos

* Add defs files to manila, poughkeepsie, rome and santiago

* Fix FakeCambridgeV2

* Add Hanoi and Kolkata to FakeProviderV2

* Handle no pulse backends in V2

* Fix getting qubit properties from properties bug

* Fix _parse_inst_map for BackendV2 with no pulse support

* Revert "Update backend_converter.py"

This reverts commit 2438935.

* Revert " @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target"

This reverts commit eec4a49.

* Use dicts instead of conf, props, defs objects

* remove channels

* add type hints

* Use dict.get instead of brackets

* clean up backend_converter.py

* construct target using defs files if it exist

* Fix typo in target.acquire_alignment

* Handle BackendV2 in transpiler._parse_inst_map

* Comment out backends in fake provider and Aer run method for testing

* undo typo fix for target.acquire_alignment

* Revert "Comment out backends in fake provider and Aer run method for testing"

This reverts commit 2127b34.

* Copy NoiseModel.from_backend() method from Aer

* modify NoiseModel.from_backend method to support V2 backend

* Build V2 backend noise model from self._props_dict

* black reformatting

* Move V2 backend code to above V1 and Legacy

* Clean up FakeBackendV2 for testing

* Order FakeBackendV2 to match BackendV2

* Uncomment out fake backends from fake provider v1 and fake legacy provider

* Remove unused imports

* Remove FakeTokyoV2 import

* Remove warnings for missing conf, props and defs files

* Remove lazy loading of target

* Remove lazy loading of qubit properties

* Remove deprecation warning for standard_gates option in noise model

* linting for fake_backend.py

* linting for backend_converter.py

* fix `Redefining name 'warnings' from outer scope` error

* lint: rename qubit_props_dict_from_props_dict

* Raise error for pulse simulation

* remove warnings flag

* Move V2 to in front of V1

* revert changes in transpiler._parse_inst_map

The changes are now in a separate PR: #7765

* remove warnings flag

* fix 'no-else-raise' error

* Add docstring to FakeBackendV2

* rename `kwargs` to `options` in .run method

following BackendV2

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* rearrange raising error for pulse job

* Add a TODO comment for removing PulseDefaults

* fix typo

* black reformat

* Add release note.

* Fix no else raise error

* Add blank new line in release note

* black formatting

* fix release note missing black tick

* Rename FakeProviderV2 to FakeProviderForBackendV2

* Re-export FakeProviderForBackendV2 to qiskit.providers.fake_provider

* black reformatting

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
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
* Add backend converter script from Matthew

Co-Authored-By: Matthew Treinish <mtreinish@kortar.org>

* FakeBackendV2, FakeQasmBeckendV2, FakeJakartaV2 in progress

* Temporary fix for circular import

* First try of implementing FakeJakartaV2 based on FakeQasmBackendV2/FakeBackendV2

* Implement FakeQasmBackend methods into FakeBackendV2

* Implement FakePulseBackend methods into FakeBackendV2

* Import missing PulseDefaults and adjust _get_conf_from_json method position

* Adjust _get_config_from_dict method position

* Fix target property

Need to take closer look at _convert_to_target method

* Fix _default_options method

* Add FakeProviderV2 for V2 fake backends

* Remove FakeQasmBackendV2 class

* Copy run method from FakeBackendV1

* change configuration to self._configuration

* Update backend_converter.py

Based on the latest version on Qiskit/qiskit-ibm-runtime#102

Co-Authored-By: Rathish Cholarajan <rathishc24@gmail.com>

* @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target

* Add dtm

* Add qubit properties

* Add drive, measure and acquire channels.

* Fix test_fake_backends

* Fix ConfigurableFakeBackend circular import problem

* Fix configurable_backend circular import problem

* FakeAlmadenV2

* FakeArmonkV2

* FakeAthensV2

* FakeBelemV2

* FakeBoeblingenV2

* Add fake backends (except rueschlikon, tenerife and tokyo)

* import fake v2 backends in __init__.py

* add fake backends to mock.backend.__init__ and fake provider

* Fix typos

* Add defs files to manila, poughkeepsie, rome and santiago

* Fix FakeCambridgeV2

* Add Hanoi and Kolkata to FakeProviderV2

* Handle no pulse backends in V2

* Fix getting qubit properties from properties bug

* Fix _parse_inst_map for BackendV2 with no pulse support

* Revert "Update backend_converter.py"

This reverts commit 2438935d218bf3e1059bef185d77c426cc0978d3.

* Revert " @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target"

This reverts commit eec4a49f590399c15a90c4579844009cc9d0dc20.

* Use dicts instead of conf, props, defs objects

* remove channels

* add type hints

* Use dict.get instead of brackets

* clean up backend_converter.py

* construct target using defs files if it exist

* Fix typo in target.acquire_alignment

* Handle BackendV2 in transpiler._parse_inst_map

* Comment out backends in fake provider and Aer run method for testing

* undo typo fix for target.acquire_alignment

* Revert "Comment out backends in fake provider and Aer run method for testing"

This reverts commit 2127b345b63e9dea1bbdbd44b397f1d14089213b.

* Copy NoiseModel.from_backend() method from Aer

* modify NoiseModel.from_backend method to support V2 backend

* Build V2 backend noise model from self._props_dict

* black reformatting

* Move V2 backend code to above V1 and Legacy

* Clean up FakeBackendV2 for testing

* Order FakeBackendV2 to match BackendV2

* Uncomment out fake backends from fake provider v1 and fake legacy provider

* Remove unused imports

* Remove FakeTokyoV2 import

* Remove warnings for missing conf, props and defs files

* Remove lazy loading of target

* Remove lazy loading of qubit properties

* Remove deprecation warning for standard_gates option in noise model

* linting for fake_backend.py

* linting for backend_converter.py

* fix `Redefining name 'warnings' from outer scope` error

* lint: rename qubit_props_dict_from_props_dict

* Raise error for pulse simulation

* remove warnings flag

* Move V2 to in front of V1

* revert changes in transpiler._parse_inst_map

The changes are now in a separate PR: Qiskit/qiskit#7765

* remove warnings flag

* fix 'no-else-raise' error

* Add docstring to FakeBackendV2

* rename `kwargs` to `options` in .run method

following BackendV2

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* rearrange raising error for pulse job

* Add a TODO comment for removing PulseDefaults

* fix typo

* black reformat

* Add release note.

* Fix no else raise error

* Add blank new line in release note

* black formatting

* fix release note missing black tick

* Rename FakeProviderV2 to FakeProviderForBackendV2

* Re-export FakeProviderForBackendV2 to qiskit.providers.fake_provider

* black reformatting

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
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
* Add backend converter script from Matthew

Co-Authored-By: Matthew Treinish <mtreinish@kortar.org>

* FakeBackendV2, FakeQasmBeckendV2, FakeJakartaV2 in progress

* Temporary fix for circular import

* First try of implementing FakeJakartaV2 based on FakeQasmBackendV2/FakeBackendV2

* Implement FakeQasmBackend methods into FakeBackendV2

* Implement FakePulseBackend methods into FakeBackendV2

* Import missing PulseDefaults and adjust _get_conf_from_json method position

* Adjust _get_config_from_dict method position

* Fix target property

Need to take closer look at _convert_to_target method

* Fix _default_options method

* Add FakeProviderV2 for V2 fake backends

* Remove FakeQasmBackendV2 class

* Copy run method from FakeBackendV1

* change configuration to self._configuration

* Update backend_converter.py

Based on the latest version on Qiskit/qiskit-ibm-runtime#102

Co-Authored-By: Rathish Cholarajan <rathishc24@gmail.com>

* @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target

* Add dtm

* Add qubit properties

* Add drive, measure and acquire channels.

* Fix test_fake_backends

* Fix ConfigurableFakeBackend circular import problem

* Fix configurable_backend circular import problem

* FakeAlmadenV2

* FakeArmonkV2

* FakeAthensV2

* FakeBelemV2

* FakeBoeblingenV2

* Add fake backends (except rueschlikon, tenerife and tokyo)

* import fake v2 backends in __init__.py

* add fake backends to mock.backend.__init__ and fake provider

* Fix typos

* Add defs files to manila, poughkeepsie, rome and santiago

* Fix FakeCambridgeV2

* Add Hanoi and Kolkata to FakeProviderV2

* Handle no pulse backends in V2

* Fix getting qubit properties from properties bug

* Fix _parse_inst_map for BackendV2 with no pulse support

* Revert "Update backend_converter.py"

This reverts commit 2438935d218bf3e1059bef185d77c426cc0978d3.

* Revert " @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target"

This reverts commit eec4a49f590399c15a90c4579844009cc9d0dc20.

* Use dicts instead of conf, props, defs objects

* remove channels

* add type hints

* Use dict.get instead of brackets

* clean up backend_converter.py

* construct target using defs files if it exist

* Fix typo in target.acquire_alignment

* Handle BackendV2 in transpiler._parse_inst_map

* Comment out backends in fake provider and Aer run method for testing

* undo typo fix for target.acquire_alignment

* Revert "Comment out backends in fake provider and Aer run method for testing"

This reverts commit 2127b345b63e9dea1bbdbd44b397f1d14089213b.

* Copy NoiseModel.from_backend() method from Aer

* modify NoiseModel.from_backend method to support V2 backend

* Build V2 backend noise model from self._props_dict

* black reformatting

* Move V2 backend code to above V1 and Legacy

* Clean up FakeBackendV2 for testing

* Order FakeBackendV2 to match BackendV2

* Uncomment out fake backends from fake provider v1 and fake legacy provider

* Remove unused imports

* Remove FakeTokyoV2 import

* Remove warnings for missing conf, props and defs files

* Remove lazy loading of target

* Remove lazy loading of qubit properties

* Remove deprecation warning for standard_gates option in noise model

* linting for fake_backend.py

* linting for backend_converter.py

* fix `Redefining name 'warnings' from outer scope` error

* lint: rename qubit_props_dict_from_props_dict

* Raise error for pulse simulation

* remove warnings flag

* Move V2 to in front of V1

* revert changes in transpiler._parse_inst_map

The changes are now in a separate PR: Qiskit/qiskit#7765

* remove warnings flag

* fix 'no-else-raise' error

* Add docstring to FakeBackendV2

* rename `kwargs` to `options` in .run method

following BackendV2

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* rearrange raising error for pulse job

* Add a TODO comment for removing PulseDefaults

* fix typo

* black reformat

* Add release note.

* Fix no else raise error

* Add blank new line in release note

* black formatting

* fix release note missing black tick

* Rename FakeProviderV2 to FakeProviderForBackendV2

* Re-export FakeProviderForBackendV2 to qiskit.providers.fake_provider

* black reformatting

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
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
* Add backend converter script from Matthew

Co-Authored-By: Matthew Treinish <mtreinish@kortar.org>

* FakeBackendV2, FakeQasmBeckendV2, FakeJakartaV2 in progress

* Temporary fix for circular import

* First try of implementing FakeJakartaV2 based on FakeQasmBackendV2/FakeBackendV2

* Implement FakeQasmBackend methods into FakeBackendV2

* Implement FakePulseBackend methods into FakeBackendV2

* Import missing PulseDefaults and adjust _get_conf_from_json method position

* Adjust _get_config_from_dict method position

* Fix target property

Need to take closer look at _convert_to_target method

* Fix _default_options method

* Add FakeProviderV2 for V2 fake backends

* Remove FakeQasmBackendV2 class

* Copy run method from FakeBackendV1

* change configuration to self._configuration

* Update backend_converter.py

Based on the latest version on Qiskit#102

Co-Authored-By: Rathish Cholarajan <rathishc24@gmail.com>

* @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target

* Add dtm

* Add qubit properties

* Add drive, measure and acquire channels.

* Fix test_fake_backends

* Fix ConfigurableFakeBackend circular import problem

* Fix configurable_backend circular import problem

* FakeAlmadenV2

* FakeArmonkV2

* FakeAthensV2

* FakeBelemV2

* FakeBoeblingenV2

* Add fake backends (except rueschlikon, tenerife and tokyo)

* import fake v2 backends in __init__.py

* add fake backends to mock.backend.__init__ and fake provider

* Fix typos

* Add defs files to manila, poughkeepsie, rome and santiago

* Fix FakeCambridgeV2

* Add Hanoi and Kolkata to FakeProviderV2

* Handle no pulse backends in V2

* Fix getting qubit properties from properties bug

* Fix _parse_inst_map for BackendV2 with no pulse support

* Revert "Update backend_converter.py"

This reverts commit 2438935d218bf3e1059bef185d77c426cc0978d3.

* Revert " @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target"

This reverts commit eec4a49f590399c15a90c4579844009cc9d0dc20.

* Use dicts instead of conf, props, defs objects

* remove channels

* add type hints

* Use dict.get instead of brackets

* clean up backend_converter.py

* construct target using defs files if it exist

* Fix typo in target.acquire_alignment

* Handle BackendV2 in transpiler._parse_inst_map

* Comment out backends in fake provider and Aer run method for testing

* undo typo fix for target.acquire_alignment

* Revert "Comment out backends in fake provider and Aer run method for testing"

This reverts commit 2127b345b63e9dea1bbdbd44b397f1d14089213b.

* Copy NoiseModel.from_backend() method from Aer

* modify NoiseModel.from_backend method to support V2 backend

* Build V2 backend noise model from self._props_dict

* black reformatting

* Move V2 backend code to above V1 and Legacy

* Clean up FakeBackendV2 for testing

* Order FakeBackendV2 to match BackendV2

* Uncomment out fake backends from fake provider v1 and fake legacy provider

* Remove unused imports

* Remove FakeTokyoV2 import

* Remove warnings for missing conf, props and defs files

* Remove lazy loading of target

* Remove lazy loading of qubit properties

* Remove deprecation warning for standard_gates option in noise model

* linting for fake_backend.py

* linting for backend_converter.py

* fix `Redefining name 'warnings' from outer scope` error

* lint: rename qubit_props_dict_from_props_dict

* Raise error for pulse simulation

* remove warnings flag

* Move V2 to in front of V1

* revert changes in transpiler._parse_inst_map

The changes are now in a separate PR: Qiskit/qiskit#7765

* remove warnings flag

* fix 'no-else-raise' error

* Add docstring to FakeBackendV2

* rename `kwargs` to `options` in .run method

following BackendV2

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* rearrange raising error for pulse job

* Add a TODO comment for removing PulseDefaults

* fix typo

* black reformat

* Add release note.

* Fix no else raise error

* Add blank new line in release note

* black formatting

* fix release note missing black tick

* Rename FakeProviderV2 to FakeProviderForBackendV2

* Re-export FakeProviderForBackendV2 to qiskit.providers.fake_provider

* black reformatting

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
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
* Add backend converter script from Matthew

Co-Authored-By: Matthew Treinish <mtreinish@kortar.org>

* FakeBackendV2, FakeQasmBeckendV2, FakeJakartaV2 in progress

* Temporary fix for circular import

* First try of implementing FakeJakartaV2 based on FakeQasmBackendV2/FakeBackendV2

* Implement FakeQasmBackend methods into FakeBackendV2

* Implement FakePulseBackend methods into FakeBackendV2

* Import missing PulseDefaults and adjust _get_conf_from_json method position

* Adjust _get_config_from_dict method position

* Fix target property

Need to take closer look at _convert_to_target method

* Fix _default_options method

* Add FakeProviderV2 for V2 fake backends

* Remove FakeQasmBackendV2 class

* Copy run method from FakeBackendV1

* change configuration to self._configuration

* Update backend_converter.py

Based on the latest version on Qiskit/qiskit-ibm-runtime#102

Co-Authored-By: Rathish Cholarajan <rathishc24@gmail.com>

* @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target

* Add dtm

* Add qubit properties

* Add drive, measure and acquire channels.

* Fix test_fake_backends

* Fix ConfigurableFakeBackend circular import problem

* Fix configurable_backend circular import problem

* FakeAlmadenV2

* FakeArmonkV2

* FakeAthensV2

* FakeBelemV2

* FakeBoeblingenV2

* Add fake backends (except rueschlikon, tenerife and tokyo)

* import fake v2 backends in __init__.py

* add fake backends to mock.backend.__init__ and fake provider

* Fix typos

* Add defs files to manila, poughkeepsie, rome and santiago

* Fix FakeCambridgeV2

* Add Hanoi and Kolkata to FakeProviderV2

* Handle no pulse backends in V2

* Fix getting qubit properties from properties bug

* Fix _parse_inst_map for BackendV2 with no pulse support

* Revert "Update backend_converter.py"

This reverts commit 2438935.

* Revert " @rathishcholarajan Use BackendConfiguration, BackendProperties and PulseDefaults classes for convert_to_target"

This reverts commit eec4a49.

* Use dicts instead of conf, props, defs objects

* remove channels

* add type hints

* Use dict.get instead of brackets

* clean up backend_converter.py

* construct target using defs files if it exist

* Fix typo in target.acquire_alignment

* Handle BackendV2 in transpiler._parse_inst_map

* Comment out backends in fake provider and Aer run method for testing

* undo typo fix for target.acquire_alignment

* Revert "Comment out backends in fake provider and Aer run method for testing"

This reverts commit 2127b34.

* Copy NoiseModel.from_backend() method from Aer

* modify NoiseModel.from_backend method to support V2 backend

* Build V2 backend noise model from self._props_dict

* black reformatting

* Move V2 backend code to above V1 and Legacy

* Clean up FakeBackendV2 for testing

* Order FakeBackendV2 to match BackendV2

* Uncomment out fake backends from fake provider v1 and fake legacy provider

* Remove unused imports

* Remove FakeTokyoV2 import

* Remove warnings for missing conf, props and defs files

* Remove lazy loading of target

* Remove lazy loading of qubit properties

* Remove deprecation warning for standard_gates option in noise model

* linting for fake_backend.py

* linting for backend_converter.py

* fix `Redefining name 'warnings' from outer scope` error

* lint: rename qubit_props_dict_from_props_dict

* Raise error for pulse simulation

* remove warnings flag

* Move V2 to in front of V1

* revert changes in transpiler._parse_inst_map

The changes are now in a separate PR: Qiskit#7765

* remove warnings flag

* fix 'no-else-raise' error

* Add docstring to FakeBackendV2

* rename `kwargs` to `options` in .run method

following BackendV2

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* Update qiskit/test/mock/fake_backend.py

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>

* rearrange raising error for pulse job

* Add a TODO comment for removing PulseDefaults

* fix typo

* black reformat

* Add release note.

* Fix no else raise error

* Add blank new line in release note

* black formatting

* fix release note missing black tick

* Rename FakeProviderV2 to FakeProviderForBackendV2

* Re-export FakeProviderForBackendV2 to qiskit.providers.fake_provider

* black reformatting

Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
Co-authored-by: Rathish Cholarajan <rathishc24@gmail.com>
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: Fixed Add a "Fixed" entry in the GitHub Release changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add BackendV2 support for transpiler._parse_inst_map()

3 participants