From 6bd1785c6d7a761fab3ae2edf4e43bb840a0292c Mon Sep 17 00:00:00 2001 From: Daniel Date: Thu, 25 Jan 2024 21:24:18 +0800 Subject: [PATCH] fix lint --- packages/openfermion/quri_parts/openfermion/ansatz/uccsd.py | 3 +-- packages/openfermion/tests/openfermion/ansatz/test_uccsd.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/openfermion/quri_parts/openfermion/ansatz/uccsd.py b/packages/openfermion/quri_parts/openfermion/ansatz/uccsd.py index 1f6677bc..ee012af7 100644 --- a/packages/openfermion/quri_parts/openfermion/ansatz/uccsd.py +++ b/packages/openfermion/quri_parts/openfermion/ansatz/uccsd.py @@ -134,8 +134,7 @@ def __init__( if n_fermions % 2 and singlet_excitation: raise ValueError( - "Singlet excitation is not supported when " - "number of electron is odd." + "Singlet excitation is not supported when " "number of electron is odd." ) if n_vir_sorbs <= 0: diff --git a/packages/openfermion/tests/openfermion/ansatz/test_uccsd.py b/packages/openfermion/tests/openfermion/ansatz/test_uccsd.py index 0d07b8b9..448b4e90 100644 --- a/packages/openfermion/tests/openfermion/ansatz/test_uccsd.py +++ b/packages/openfermion/tests/openfermion/ansatz/test_uccsd.py @@ -401,8 +401,7 @@ def test_singlet_uccsd_invalid_input(self) -> None: with pytest.raises( ValueError, match=( - "Singlet excitation is not supported when " - "number of electron is odd." + "Singlet excitation is not supported when " "number of electron is odd." ), ): TrotterUCCSD(4, 3, singlet_excitation=True)