From 457b46e583587b28133eb4c5f94b4f167440fa7b Mon Sep 17 00:00:00 2001 From: Apostolos Chalkis Date: Thu, 26 Sep 2024 14:24:05 +0300 Subject: [PATCH] fix style and copyright errors --- qiskit_optimization/algorithms/admm_optimizer.py | 2 +- qiskit_optimization/algorithms/cobyla_optimizer.py | 2 +- .../algorithms/goemans_williamson_optimizer.py | 2 +- qiskit_optimization/algorithms/optimization_algorithm.py | 2 +- .../algorithms/recursive_minimum_eigen_optimizer.py | 2 +- qiskit_optimization/algorithms/slsqp_optimizer.py | 2 +- qiskit_optimization/algorithms/warm_start_qaoa_optimizer.py | 2 +- qiskit_optimization/applications/vehicle_routing.py | 2 +- qiskit_optimization/problems/linear_constraint.py | 2 +- qiskit_optimization/problems/quadratic_constraint.py | 2 +- qiskit_optimization/problems/quadratic_objective.py | 2 +- qiskit_optimization/problems/quadratic_program.py | 2 +- qiskit_optimization/problems/variable.py | 2 +- qiskit_optimization/translators/prettyprint.py | 2 +- test/optimizers/test_spsa.py | 4 +++- test/translators/test_prettyprint.py | 2 +- 16 files changed, 18 insertions(+), 16 deletions(-) diff --git a/qiskit_optimization/algorithms/admm_optimizer.py b/qiskit_optimization/algorithms/admm_optimizer.py index a41f1aa9..0def1c9b 100644 --- a/qiskit_optimization/algorithms/admm_optimizer.py +++ b/qiskit_optimization/algorithms/admm_optimizer.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2020, 2023. +# (C) Copyright IBM 2020, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/algorithms/cobyla_optimizer.py b/qiskit_optimization/algorithms/cobyla_optimizer.py index 1d5f2e7b..553014bb 100644 --- a/qiskit_optimization/algorithms/cobyla_optimizer.py +++ b/qiskit_optimization/algorithms/cobyla_optimizer.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2020, 2023. +# (C) Copyright IBM 2020, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/algorithms/goemans_williamson_optimizer.py b/qiskit_optimization/algorithms/goemans_williamson_optimizer.py index 536d287e..bf015944 100644 --- a/qiskit_optimization/algorithms/goemans_williamson_optimizer.py +++ b/qiskit_optimization/algorithms/goemans_williamson_optimizer.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2021, 2023. +# (C) Copyright IBM 2021, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/algorithms/optimization_algorithm.py b/qiskit_optimization/algorithms/optimization_algorithm.py index 29545673..fa21bbc9 100644 --- a/qiskit_optimization/algorithms/optimization_algorithm.py +++ b/qiskit_optimization/algorithms/optimization_algorithm.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2020, 2023. +# (C) Copyright IBM 2020, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/algorithms/recursive_minimum_eigen_optimizer.py b/qiskit_optimization/algorithms/recursive_minimum_eigen_optimizer.py index 5a967ce5..add88c0a 100644 --- a/qiskit_optimization/algorithms/recursive_minimum_eigen_optimizer.py +++ b/qiskit_optimization/algorithms/recursive_minimum_eigen_optimizer.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2020, 2023. +# (C) Copyright IBM 2020, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/algorithms/slsqp_optimizer.py b/qiskit_optimization/algorithms/slsqp_optimizer.py index cca1731e..47ebb126 100644 --- a/qiskit_optimization/algorithms/slsqp_optimizer.py +++ b/qiskit_optimization/algorithms/slsqp_optimizer.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2020, 2023. +# (C) Copyright IBM 2020, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/algorithms/warm_start_qaoa_optimizer.py b/qiskit_optimization/algorithms/warm_start_qaoa_optimizer.py index 31b4a9bf..b57cc710 100644 --- a/qiskit_optimization/algorithms/warm_start_qaoa_optimizer.py +++ b/qiskit_optimization/algorithms/warm_start_qaoa_optimizer.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2021, 2023. +# (C) Copyright IBM 2021, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/applications/vehicle_routing.py b/qiskit_optimization/applications/vehicle_routing.py index e31eafee..86d7b87a 100644 --- a/qiskit_optimization/applications/vehicle_routing.py +++ b/qiskit_optimization/applications/vehicle_routing.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2018, 2023. +# (C) Copyright IBM 2018, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/problems/linear_constraint.py b/qiskit_optimization/problems/linear_constraint.py index b887772b..e144289f 100644 --- a/qiskit_optimization/problems/linear_constraint.py +++ b/qiskit_optimization/problems/linear_constraint.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2019, 2023. +# (C) Copyright IBM 2019, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/problems/quadratic_constraint.py b/qiskit_optimization/problems/quadratic_constraint.py index 4a74eefb..ee044f36 100644 --- a/qiskit_optimization/problems/quadratic_constraint.py +++ b/qiskit_optimization/problems/quadratic_constraint.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2019, 2023. +# (C) Copyright IBM 2019, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/problems/quadratic_objective.py b/qiskit_optimization/problems/quadratic_objective.py index d41903c8..385735df 100644 --- a/qiskit_optimization/problems/quadratic_objective.py +++ b/qiskit_optimization/problems/quadratic_objective.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2019, 2023. +# (C) Copyright IBM 2019, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/problems/quadratic_program.py b/qiskit_optimization/problems/quadratic_program.py index 3dfe1fe8..e60dc81e 100644 --- a/qiskit_optimization/problems/quadratic_program.py +++ b/qiskit_optimization/problems/quadratic_program.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2019, 2023. +# (C) Copyright IBM 2019, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/problems/variable.py b/qiskit_optimization/problems/variable.py index de6518eb..06d8e048 100644 --- a/qiskit_optimization/problems/variable.py +++ b/qiskit_optimization/problems/variable.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2019, 2023. +# (C) Copyright IBM 2019, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/qiskit_optimization/translators/prettyprint.py b/qiskit_optimization/translators/prettyprint.py index 9d140d19..2b4f97b6 100644 --- a/qiskit_optimization/translators/prettyprint.py +++ b/qiskit_optimization/translators/prettyprint.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2022, 2023. +# (C) Copyright IBM 2022, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory diff --git a/test/optimizers/test_spsa.py b/test/optimizers/test_spsa.py index f0a928b4..f4b1f01e 100644 --- a/test/optimizers/test_spsa.py +++ b/test/optimizers/test_spsa.py @@ -129,7 +129,9 @@ class TerminationChecker: def __init__(self): self.values = [] - def __call__(self, nfev, point, fvalue, stepsize, accepted) -> bool: # pylint: disable=too-many-positional-arguments + def __call__( # pylint: disable=too-many-positional-arguments + self, nfev, point, fvalue, stepsize, accepted + ) -> bool: self.values.append(fvalue) if len(self.values) > 10: diff --git a/test/translators/test_prettyprint.py b/test/translators/test_prettyprint.py index 5cf9ffbf..02232c49 100644 --- a/test/translators/test_prettyprint.py +++ b/test/translators/test_prettyprint.py @@ -1,6 +1,6 @@ # This code is part of a Qiskit project. # -# (C) Copyright IBM 2022, 2023. +# (C) Copyright IBM 2022, 2024. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory