Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Fixed
- Supported constant values on the left-hand side of constraints and variables on the right-hand
side of constraints for the DOcplex translator (#750)
- WeightedPauliOperator constructor simplification bug (#891)
- TPBGroupedWeightedPauliOperator multiplication (#915)

[0.6.6](https://github.com/Qiskit/qiskit-aqua/compare/0.6.5...0.6.6) - 2020-04-16
=================================================================================
Expand Down
8 changes: 4 additions & 4 deletions qiskit/aqua/operators/tpb_grouped_weighted_pauli_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,21 +231,21 @@ def _add_or_sub(self, other, operation, copy=True):
"""
# perform add or sub in paulis and then re-group it again
ret_op = super()._add_or_sub(other, operation, copy)
# pylint: disable=no-member
ret_op = ret_op._grouping_func(ret_op, **self._kwargs)
ret_op = self._grouping_func(ret_op, **self._kwargs)
return ret_op

def multiply(self, other):
"""
Perform self * other.

Note: Grouping of the new operator, will be as per self's grouping.

Args:
other (TPBGroupedWeightedPauliOperator): an operator

Returns:
TPBGroupedWeightedPauliOperator: the multiplied operator
"""
ret_op = super().multiply(other)
# pylint: disable=no-member
ret_op = ret_op._grouping_func(ret_op, **self._kwargs)
ret_op = self._grouping_func(ret_op, **self._kwargs)
return ret_op