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

Fix instruction inheritance issues #1908

Merged
merged 11 commits into from
Mar 10, 2019
Merged

Fix instruction inheritance issues #1908

merged 11 commits into from
Mar 10, 2019

Conversation

Woody1193
Copy link
Contributor

Fixes #1892

Summary

Modified the way in which type-checking is done in instruction.py to allow QuantumRegister and ClassicalRegister to be inherited from.

Details and comments

This PR is a repeat as I mistakenly attempted to merge with stable.

Type-equality checking is brittle and should be avoided except in the case where inheritance is to be disregarded for a class. That appears to be the case for neither QuantumRegister nor ClassicalRegister.

mtreinish and others added 7 commits March 4, 2019 10:45
* fix BasicAer sampling bug (#1624)

* fix BasicAer sampling bug

* changelog

* remove legacysimulator from test_compile

Conflicts:
    CHANGELOG.rst
    test/python/tools/test_compiler.py

The changelog conflicts were inevitable as the stable branch doesn't
have the same history as master. As for the test conflict it was a
difference in the simulator (python vs c++) used, this backport
switches to use the python like on master.

(cherry picked from commit 5f7b2e7)

* Try pinning isort version

* Use constraints from last working version of lint

* Add requirements constraints too
* Bump version and prepare for 0.7.1 release

To prepare for the 0.7.1 bugfix release we need to increase the version
number and update the changelog. This commit takes care of that so we
can tag the release and build it.
Copy link
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.

Thanks for the patch, the code LGTM. But, before we can merge this you'll just need to update the changelog to fit the format a better. (ie remove the 0.7.2 header and move the new entry to the existing fixed section.

CHANGELOG.rst Outdated Show resolved Hide resolved
CHANGELOG.rst Outdated Show resolved Hide resolved
@ajavadia ajavadia merged commit a70d532 into Qiskit:master Mar 10, 2019
lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this pull request Jul 30, 2019
* fix BasicAer sampling bug (Qiskit#1624) (Qiskit#1859)

* fix BasicAer sampling bug (Qiskit#1624)

* fix BasicAer sampling bug

* changelog

* remove legacysimulator from test_compile

Conflicts:
    CHANGELOG.rst
    test/python/tools/test_compiler.py

The changelog conflicts were inevitable as the stable branch doesn't
have the same history as master. As for the test conflict it was a
difference in the simulator (python vs c++) used, this backport
switches to use the python like on master.

(cherry picked from commit 5f7b2e7)

* Try pinning isort version

* Use constraints from last working version of lint

* Add requirements constraints too

* Bump version and prepare for 0.7.1 release (Qiskit#1886)

* Bump version and prepare for 0.7.1 release

To prepare for the 0.7.1 bugfix release we need to increase the version
number and update the changelog. This commit takes care of that so we
can tag the release and build it.

* Addressed issue with instruction.py which prohibited inheritance of QuantumRegisters and ClassicalRegisters

* Updated changelog

* Fixed typo

* Reverted changes from merge with Stable

* Fixed changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants