Skip to content

Commit

Permalink
optimize SparsePauliOp.tensor (#9621)
Browse files Browse the repository at this point in the history
Co-authored-by: Ikko Hamamura <ikkoham@users.noreply.github.com>
  • Loading branch information
t-imamichi and ikkoham committed Feb 21, 2023
1 parent 4e3b283 commit e2d31ff
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ def expand(self, other):
def _tensor(cls, a, b):
paulis = a.paulis.tensor(b.paulis)
coeffs = np.kron(a.coeffs, b.coeffs)
return SparsePauliOp(paulis, coeffs, copy=False)
return SparsePauliOp(paulis, coeffs, ignore_pauli_phase=True, copy=False)

def _add(self, other, qargs=None):
if qargs is None:
Expand Down

0 comments on commit e2d31ff

Please sign in to comment.