This repository has been archived by the owner on Dec 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 376
Operator.compose should allow indices #1144
Merged
woodsp-ibm
merged 126 commits into
qiskit-community:master
from
molar-volume:issue_1088
Sep 25, 2020
Merged
Changes from all commits
Commits
Show all changes
126 commits
Select commit
Hold shift + click to select a range
246dbe9
Merge pull request #1 from Qiskit/master
molar-volume b01af1c
Merge branch 'master' of github.com:Qiskit/qiskit-aqua
molar-volume e7666d7
Merge branch 'master' of github.com:Qiskit/qiskit-aqua
molar-volume 0235fed
Merge github.com:Qiskit/qiskit-aqua
molar-volume 9162eec
1) modified PrimitiveOp._check_zero_for_composition_and_expand, so th…
molar-volume 5ff3d65
CircuitStateFn.tensor did not set is_measurement parameter (hence alw…
molar-volume 95ad488
Added test for expand method on StateFn subclasses
molar-volume cb6a709
fixed linting
molar-volume f7ef909
fixed linting and mypy
molar-volume 804054e
fixed unexpected indentation
molar-volume 0c831f9
1) PauliOp.permute implemented
molar-volume e105a32
Merge branch 'master' into issue_1088
manoelmarques a4e7114
1) permute implemented for MatrixOp
molar-volume 3d5548a
Merge branch 'issue_1088' of https://github.com/molar-volume/qiskit-a…
molar-volume 8f83835
fix linting
molar-volume 655f209
identity renamed to identity_operator in OperatorBase
molar-volume 5b6f01e
OperatorBase.expand renamed to expand_to_dim
molar-volume 75ab5fe
Merge branch 'master' into issue_1088
molar-volume 34dddd2
expand_to_dim overridden for PrimitiveOps
molar-volume be04488
Merge branch 'issue_1088' of https://github.com/molar-volume/qiskit-a…
molar-volume 3915c6e
1) expand_to_dim implemented for each subclass of OperatorBase
molar-volume 47a48e6
fixed linting
molar-volume e197f06
OperatorStateFn permute implemented
molar-volume bcebc5c
1) permute for TensoredOp
molar-volume 07eb035
1) TensoredOp.permute moved to ListOp.permute
molar-volume b006214
unexpected indentation fixed.
molar-volume a93d26a
permute defined abstract in OperatorBase
molar-volume b11e478
composition of PrimitiveOp with ComposedOp prepends the ComposedOp.op…
molar-volume c98ef81
Revert "composition of PrimitiveOp with ComposedOp prepends the Compo…
molar-volume 253d707
fixed syntax in ListOp.permute
molar-volume 04b660c
Merge github.com:Qiskit/qiskit-aqua
molar-volume 3d735b9
1) compose in MatrixOp, PauliOp and CircuitOp enhanced, to be consist…
molar-volume a83f6ef
DRY applied
molar-volume bc585fb
merge branch issue_1165 into issue_1088
molar-volume 33e7e91
Test if ListOp.permute is consistent with PrimitiveOp permute methods
molar-volume 984e23f
test for expand_to_dim on ListOps
molar-volume 6088384
1) changed signature of compose to allow permutations on operators
molar-volume 3e646bd
refactoring
molar-volume 8e34851
unit test for compose with indices
molar-volume c6e3718
refactoring and fixed linting
molar-volume f757fb8
1) StateFn.compose expands the shorter operators with identity
molar-volume 9fe3b38
Merge branch 'master' into issue_1088
molar-volume f6ac702
fixed unexpected indentation
molar-volume 62bec0c
Merge branch 'issue_1088' of https://github.com/molar-volume/qiskit-a…
molar-volume 59dd5fc
doc html fix
molar-volume f269e5f
fix unexpected indentation
molar-volume 691ab94
1) expand_to_dim renamed to expand_with_identities (expand_to_dim was…
molar-volume aed6940
fixed line too long
molar-volume 1dbff1f
permute implemented for DictStateFn
molar-volume c599147
1) VectorStateFn.to_dict_fn and DictStateFn.to_vector_state_fn implem…
molar-volume 7ee9ee5
fixed linting
molar-volume dfd7908
Merge branch 'master' into issue_1088
molar-volume 0e03efe
cyclic import solved
molar-volume 1ef1b30
fixed linting
molar-volume d856698
1) more unit tests for compose of StateFn with indices
molar-volume 2b29251
Merge branch 'master' into issue_1088
molar-volume 5476fcf
Merge branch 'master' into issue_1088
molar-volume 3098688
Update qiskit/aqua/operators/evolutions/evolved_op.py
molar-volume 133d4ef
Update qiskit/aqua/operators/list_ops/list_op.py
molar-volume fb9685c
Update qiskit/aqua/operators/list_ops/list_op.py
molar-volume d973e67
Update qiskit/aqua/operators/primitive_ops/pauli_op.py
molar-volume 8b6265c
Update qiskit/aqua/operators/primitive_ops/matrix_op.py
molar-volume 26ab164
implemented custom function to decompose permutations into transposit…
molar-volume 7199ca9
Merge branch 'issue_1088' of https://github.com/molar-volume/qiskit-a…
molar-volume f0468d1
Merge branch 'master' into issue_1088
molar-volume d6950dc
explaining comment for CircuitStateFn.expand_with_identity
molar-volume f341e82
fix linting
molar-volume 05c6fce
expand_with_identity made private and renamed to _expand_dim (expand_…
molar-volume bf82719
1) Compose method has only one set of permutation indices (for other …
molar-volume dabf7c6
1) modified test_op_construction because of changes in compose signature
molar-volume 3a0f1df
Merge branch 'master' into issue_1088
molar-volume 0d2cf1a
Merge branch 'issue_1088' of https://github.com/molar-volume/qiskit-a…
molar-volume 1342735
_check_zero_for_composition_and_expand renamed to _expand_shorter_ope…
molar-volume 998bf03
VectorStateFn.permute reimplemented for better performance
molar-volume b7629f4
Merge branch 'master' into issue_1088
molar-volume 2301114
type hint added for front parameter of compose
molar-volume d7a5879
Merge branch 'master' into issue_1088
molar-volume 793f56d
fixed linting after merge
molar-volume 709b0a5
for arithmetic.transpositions, typehint for argument and docstring de…
molar-volume ee2d597
removed unnecessary apostrophes from return types
molar-volume 6fb010c
fix mypy
molar-volume 3591f57
Merge branch 'master' into issue_1088
molar-volume 3905c47
fixed mypy
molar-volume cb3a31e
Merge branch 'issue_1088' of https://github.com/molar-volume/qiskit-a…
molar-volume 8c82a1f
Merge branch 'master' into issue_1088
molar-volume 90679bb
removed unused import
molar-volume 88b782a
Update qiskit/aqua/operators/evolutions/evolved_op.py
molar-volume 780099f
Update qiskit/aqua/operators/list_ops/composed_op.py
molar-volume 8ad7ed3
Update qiskit/aqua/operators/state_fns/state_fn.py
molar-volume 6b7ec70
Update qiskit/aqua/operators/state_fns/state_fn.py
molar-volume f47bf4a
Update qiskit/aqua/operators/state_fns/vector_state_fn.py
molar-volume f302b03
Update qiskit/aqua/operators/list_ops/list_op.py
molar-volume da22d23
Update qiskit/aqua/operators/list_ops/tensored_op.py
molar-volume a6beffa
Update qiskit/aqua/operators/operator_base.py
molar-volume 3504657
Update qiskit/aqua/operators/operator_base.py
molar-volume 667fe45
Update qiskit/aqua/operators/operator_base.py
molar-volume 794ea4d
Update qiskit/aqua/operators/primitive_ops/circuit_op.py
molar-volume 628b500
Update qiskit/aqua/operators/primitive_ops/matrix_op.py
molar-volume c488187
Update qiskit/aqua/operators/primitive_ops/matrix_op.py
molar-volume b3560b1
style fixed
molar-volume 998da12
Merge branch 'issue_1088' of https://github.com/molar-volume/qiskit-a…
molar-volume e156914
fixed styles
molar-volume e3d5636
Merge branch 'master' into issue_1088
molar-volume ad21d72
fixed import after merge
molar-volume f70f48f
Update qiskit/aqua/operators/state_fns/dict_state_fn.py
molar-volume 6ba866b
removed duplicate method to_vector_state_fn (to_matrix_op was already…
molar-volume 3425c90
Merge branch 'issue_1088' of https://github.com/molar-volume/qiskit-a…
molar-volume d911933
new_self instead of self in EvolvedOp
molar-volume 9def93c
test_op_construction refactored
molar-volume 8691785
Merge branch 'master' into issue_1088
manoelmarques 31941f0
Merge branch 'master' into issue_1088
woodsp-ibm bb826d5
fix after merge
molar-volume 5edc535
Merge branch 'master' into issue_1088
molar-volume ac5f122
Update qiskit/aqua/operators/operator_base.py
molar-volume ebdba41
Typo: List -> Listt
Cryoris ff02916
Merge branch 'master' into issue_1088
woodsp-ibm 59c5c35
Merge branch 'master' into issue_1088
molar-volume e87add5
raise AquaError in ListOp.permute, if ListOp contains operators with …
molar-volume 8cb9ccf
self renamed to new_self in compose methods
molar-volume 341f489
fix linting
molar-volume 9faa2cb
unnecessary comment removed
molar-volume 3a1d0ef
Merge branch 'master' into issue_1088
molar-volume 46a49cb
remove type ignore
molar-volume 8e726d0
avoid unnecessary permutation
molar-volume 213f8f4
Merge branch 'master' into issue_1088
molar-volume 3022c37
Merge branch 'master' into issue_1088
molar-volume File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add docstrings to these methods (also all the
compose
methods 🙂 )?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, the docstrings for
compose
andpermute
are provided in OperatorBase,and e.g. MatrixOp inherits the docstring https://qiskit.org/documentation/stubs/qiskit.aqua.operators.primitive_ops.MatrixOp.compose.html#qiskit.aqua.operators.primitive_ops.MatrixOp.compose
I am not sure if it is necessary to override docstrings for all
compose
methods (and forpermute
as well), since it was not done so far.