Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcmgray committed Jun 18, 2024
1 parent 81f4dc1 commit abfa80b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions quimb/tensor/fermion/fermion_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
"""
import copy
import functools
from operator import add
import contextlib
import numpy as np
import scipy.sparse.linalg as spla
import opt_einsum as oe
from opt_einsum.contract import parse_backend, _tensordot, _transpose
from opt_einsum.contract import parse_backend
from autoray import conj

from ...utils import (oset, valmap, check_opt)
Expand Down Expand Up @@ -467,7 +466,7 @@ def _launch_fermion_expression(
right_pos.append(input_right.find(s))

# Contract!
new_view = _tensordot(Ta.data, Tb.data, axes=(tuple(left_pos), tuple(right_pos)), backend=backend)
new_view = np.tensordot(Ta.data, Tb.data, axes=(tuple(left_pos), tuple(right_pos)))

global_phase += Ta.phase.get("global_flip", False) \
+ Tb.phase.get("global_flip", False)
Expand All @@ -480,7 +479,7 @@ def _launch_fermion_expression(
# Build a new view if needed
if (tensor_result != results_index):
transpose = tuple(map(tensor_result.index, results_index))
new_view = _transpose(new_view, axes=transpose, backend=backend)
new_view = np.transpose(new_view, axes=transpose)
o_ix = [o_ix[ix] for ix in transpose]

o_tags = oset.union(Ta.tags, Tb.tags)
Expand Down
4 changes: 2 additions & 2 deletions quimb/tensor/tensor_arbgeom.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,8 @@ def local_expectation_cluster(
tuple(map(self.site_tag, where)), 'any'
)

if len(tids) == 2:
tids = self._get_string_between_tids(*tids)
# if len(tids) == 2:
# tids = self._get_string_between_tids(*tids)

k = self._select_local_tids(
tids,
Expand Down

0 comments on commit abfa80b

Please sign in to comment.