This repository was archived by the owner on Aug 21, 2023. It is now read-only.
Remove broken line from transpiler passes tutorial#985
Merged
nonhermitian merged 1 commit intoQiskit:masterfrom Aug 7, 2020
Merged
Remove broken line from transpiler passes tutorial#985nonhermitian merged 1 commit intoQiskit:masterfrom
nonhermitian merged 1 commit intoQiskit:masterfrom
Conversation
The transpiler passes tutorial was previously replacing the 'properties'
attribute of the FakeTokyo backend with an empty dictionary {}. However,
this is a type violation as properties is defined (and has been for a
very long time) as a method in the base abstract backend class. [1] This
didn't block anything because nothing the call path of the notebook was
using properties as a callable before. But in terra 0.15.0 this has
changed and backend.properties() is accessed in the setup for a
transpilation and this is causing a failure. This commit removes the use
overloading of the attribute as it doesn't seem to serve a purpose
anymore (I presume it was there for when NoiseAdaptiveLayout was in
level 3) which will unblock Qiskit/qiskit#998
[1] https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/providers/basebackend.py#L65
nonhermitian
approved these changes
Aug 7, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The transpiler passes tutorial was previously replacing the 'properties'
attribute of the FakeTokyo backend with an empty dictionary {}. However,
this is a type violation as properties is defined (and has been for a
very long time) as a method in the base abstract backend class. [1] This
didn't block anything because nothing the call path of the notebook was
using properties as a callable before. But in terra 0.15.0 this has
changed and backend.properties() is accessed in the setup for a
transpilation and this is causing a failure. This commit removes the use
overloading of the attribute as it doesn't seem to serve a purpose
anymore (I presume it was there for when NoiseAdaptiveLayout was in
level 3) which will unblock Qiskit/qiskit#998
Details and comments
[1] https://github.com/Qiskit/qiskit-terra/blob/master/qiskit/providers/basebackend.py#L65