From f0e6919d36c1cd22583b2a2b2886f03835a0198a Mon Sep 17 00:00:00 2001 From: Bruno Schmitt <7152025+boschmitt@users.noreply.github.com> Date: Wed, 4 Dec 2024 17:31:01 +0100 Subject: [PATCH] [chore] clang-format all the things. (#21) Signed-off-by: boschmitt <7152025+boschmitt@users.noreply.github.com> --- .clang-format | 4 +--- libs/solvers/include/cudaq/solvers/observe_gradient.h | 2 +- libs/solvers/lib/adapt/adapt_simulator.cpp | 4 ++-- libs/solvers/lib/operators/molecule/drivers/pyscf_driver.cpp | 4 ++-- libs/solvers/unittests/test_adapt.cpp | 2 +- libs/solvers/unittests/test_qaoa.cpp | 2 +- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.clang-format b/.clang-format index e695289..ae27124 100644 --- a/.clang-format +++ b/.clang-format @@ -2,10 +2,8 @@ BasedOnStyle: LLVM AlwaysBreakTemplateDeclarations: Yes IncludeCategories: - Regex: '^<' - Priority: 4 - - Regex: '^"(llvm|llvm-c|clang|clang-c|mlir|mlir-c)/' Priority: 3 - - Regex: '^"(qoda|\.\.)/' + - Regex: '^"(cudaq|\.\.)/' Priority: 2 - Regex: '.*' Priority: 1 diff --git a/libs/solvers/include/cudaq/solvers/observe_gradient.h b/libs/solvers/include/cudaq/solvers/observe_gradient.h index 9edc2d9..aac9126 100644 --- a/libs/solvers/include/cudaq/solvers/observe_gradient.h +++ b/libs/solvers/include/cudaq/solvers/observe_gradient.h @@ -9,8 +9,8 @@ #pragma once -#include "cudaq/algorithms/observe.h" #include "optimizer.h" +#include "cudaq/algorithms/observe.h" using namespace cudaq; using namespace cudaqx; diff --git a/libs/solvers/lib/adapt/adapt_simulator.cpp b/libs/solvers/lib/adapt/adapt_simulator.cpp index 5ec07a0..45b742e 100644 --- a/libs/solvers/lib/adapt/adapt_simulator.cpp +++ b/libs/solvers/lib/adapt/adapt_simulator.cpp @@ -9,10 +9,10 @@ #include "common/Logger.h" #include "cudaq.h" -#include "cudaq/solvers/adapt/adapt_simulator.h" -#include "cudaq/solvers/vqe.h" #include "device/adapt.h" #include "device/prepare_state.h" +#include "cudaq/solvers/adapt/adapt_simulator.h" +#include "cudaq/solvers/vqe.h" #include #include diff --git a/libs/solvers/lib/operators/molecule/drivers/pyscf_driver.cpp b/libs/solvers/lib/operators/molecule/drivers/pyscf_driver.cpp index 45cc022..a5bb696 100644 --- a/libs/solvers/lib/operators/molecule/drivers/pyscf_driver.cpp +++ b/libs/solvers/lib/operators/molecule/drivers/pyscf_driver.cpp @@ -9,10 +9,10 @@ #include "nlohmann/json.hpp" #include "cuda-qx/core/tensor.h" -#include "cudaq/solvers/operators/molecule/fermion_compiler.h" -#include "cudaq/solvers/operators/molecule/molecule_package_driver.h" #include "library_utils.h" #include "process.h" +#include "cudaq/solvers/operators/molecule/fermion_compiler.h" +#include "cudaq/solvers/operators/molecule/molecule_package_driver.h" #include "common/Logger.h" #include "common/RestClient.h" diff --git a/libs/solvers/unittests/test_adapt.cpp b/libs/solvers/unittests/test_adapt.cpp index d9d7e05..f04baf0 100644 --- a/libs/solvers/unittests/test_adapt.cpp +++ b/libs/solvers/unittests/test_adapt.cpp @@ -10,8 +10,8 @@ #include #include "cudaq.h" -#include "cudaq/solvers/adapt.h" #include "nvqpp/test_kernels.h" +#include "cudaq/solvers/adapt.h" std::vector h2_data{ 3, 1, 1, 3, 0.0454063, 0, 2, 0, 0, 0, 0.17028, 0, diff --git a/libs/solvers/unittests/test_qaoa.cpp b/libs/solvers/unittests/test_qaoa.cpp index cdef34f..a8d1a63 100644 --- a/libs/solvers/unittests/test_qaoa.cpp +++ b/libs/solvers/unittests/test_qaoa.cpp @@ -10,9 +10,9 @@ #include #include "cudaq.h" +#include "nvqpp/test_kernels.h" #include "cudaq/solvers/operators.h" #include "cudaq/solvers/qaoa.h" -#include "nvqpp/test_kernels.h" using namespace cudaq::spin;