forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This puts the `self is other` check into the `__add__` and `__sub__` methods so that the behaviour of `x + x` is consistent with `x += x`, with regards to the addition being done as a scalar multiplication instead of concatentation. Both forms are mathematically correct, but this makes sure they're aligned.
- Loading branch information
1 parent
9c2983f
commit 4fec00d
Showing
1 changed file
with
52 additions
and
37 deletions.
There are no files selected for viewing
This file contains 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