From cd0f1ce175a9b176eccd43d4430641fdafcf6c87 Mon Sep 17 00:00:00 2001 From: bartandrews Date: Fri, 1 Nov 2024 12:30:35 +0100 Subject: [PATCH] directly import UCJOpSpinBalanced for type hint --- python/ffsim/tenpy/circuits/lucj_circuit.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/ffsim/tenpy/circuits/lucj_circuit.py b/python/ffsim/tenpy/circuits/lucj_circuit.py index fc9b4a7a8..dae78b48f 100644 --- a/python/ffsim/tenpy/circuits/lucj_circuit.py +++ b/python/ffsim/tenpy/circuits/lucj_circuit.py @@ -15,12 +15,13 @@ xy, ) from ffsim.tenpy.util import product_state_as_mps +from ffsim.variational.ucj_spin_balanced import UCJOpSpinBalanced def lucj_circuit_as_mps( norb: int, nelec: tuple, - lucj_operator: "ffsim.variational.ucj_spin_balanced.UCJOpSpinBalanced", + ucj_op: UCJOpSpinBalanced, options: dict, norm_tol: float = 1e-5, ) -> tuple[MPS, list[int]]: @@ -29,7 +30,7 @@ def lucj_circuit_as_mps( Args: norb: The number of spatial orbitals. nelec: The number of alpha and beta electrons. - lucj_operator: The LUCJ operator. + ucj_op: The LUCJ operator. options: The options parsed by the `TeNPy TEBDEngine `__. norm_tol: The norm error above which we recanonicalize the wavefunction, as @@ -53,7 +54,7 @@ def lucj_circuit_as_mps( # construct the qiskit circuit qubits = QuantumRegister(2 * norb) circuit = QuantumCircuit(qubits) - circuit.append(ffsim.qiskit.UCJOpSpinBalancedJW(lucj_operator), qubits) + circuit.append(ffsim.qiskit.UCJOpSpinBalancedJW(ucj_op), qubits) # define the TEBD engine eng = TEBDEngine(psi, None, options)