From 5a194b7c3e1344cd8c35edf127447c262f076c96 Mon Sep 17 00:00:00 2001 From: yangguohao <70266361+yangguohao@users.noreply.github.com> Date: Thu, 14 Oct 2021 18:30:46 +0800 Subject: [PATCH] Update utils.py --- paddle_quantum/utils.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/paddle_quantum/utils.py b/paddle_quantum/utils.py index d2f91c9..d1d0ffe 100644 --- a/paddle_quantum/utils.py +++ b/paddle_quantum/utils.py @@ -924,9 +924,6 @@ class Hamiltonian: """ coefs, pauli_words, sites = self.decompose_with_sites() n_qubit = 1 - for site in sites: - if type(site[0]) is int: - n_qubit = max(n_qubit, max(site) + 1) for site in sites: if type(site[0]) is int: n_qubit = max(n_qubit, max(site) + 1) -- GitLab