From 24f25d813c27018466c136c615b52967d5a10586 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 08:45:53 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/qibotn/backends/quimb.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qibotn/backends/quimb.py b/src/qibotn/backends/quimb.py index 21d54ec..b2199d7 100644 --- a/src/qibotn/backends/quimb.py +++ b/src/qibotn/backends/quimb.py @@ -210,7 +210,7 @@ def expectation_observable_symbolic( This method takes a Qibo circuit, converts it to a Quimb tensor network circuit, and evaluates the expectation value of a Hamiltonian specified by three lists of strings: operators, sites, and coefficients. The expectation value is computed by summing the contributions from each term in the Hamiltonian, where each term's - expectation is calculated using Quimb's `local_expectation` function. + expectation is calculated using Quimb's `local_expectation` function. Each operator string must act on all different qubits, i.e., for each term, the corresponding sites tuple must contain unique qubit indices. Example: operators_list = ['xyz', 'xyz'], sites_list = [(1,2,3), (1,2,3)], coeffs_list = [1, 2] @@ -301,7 +301,9 @@ def _qibo_circuit_to_quimb( gate, "trainable", True ) if is_parametrized: - circ.apply_gate(quimb_gate_name, *params, *qubits, parametrized=is_parametrized) + circ.apply_gate( + quimb_gate_name, *params, *qubits, parametrized=is_parametrized + ) else: circ.apply_gate( quimb_gate_name,