From 7e0286f4a2a55de74d4d08bc398f6e0ff59deba4 Mon Sep 17 00:00:00 2001 From: Dan Lykov Date: Tue, 19 Mar 2024 18:43:45 -0500 Subject: [PATCH] torch backend no_sum fix --- qtensor/contraction_backends/torch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/qtensor/contraction_backends/torch.py b/qtensor/contraction_backends/torch.py index e684bde4..8bb2a06c 100644 --- a/qtensor/contraction_backends/torch.py +++ b/qtensor/contraction_backends/torch.py @@ -140,7 +140,10 @@ def process_bucket(self, bucket, no_sum=False): key=int, reverse=True )) else: - result_data = result_data.sum(axis=-1) + if not no_sum: + result_data = result_data.sum(axis=-1) + else: + result_data = result_data