Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
Signed-off-by: Alex McCaskey <[email protected]>
  • Loading branch information
amccaskey committed Jul 25, 2024
1 parent 1a7476d commit bd533ee
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 17 deletions.
5 changes: 2 additions & 3 deletions cudaqlib/gse.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
#pragma once

#include "gse/adapt/adapt.h"
#include "gse/vqe/vqe.h"
#include "gse/utils/operator_pool.h"
#include "gse/utils/pools/uccsd_pool.h"
#include "gse/utils/pools/spin_complement_gsd.h"

#include "gse/utils/pools/uccsd_pool.h"
#include "gse/vqe/vqe.h"
7 changes: 4 additions & 3 deletions cudaqlib/gse/adapt/adapt.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ struct AdaptKernel {

template <typename InitialState>
auto adapt_vqe(const InitialState &initialState, const spin_op &H,
const std::vector<spin_op> &poolList, optim::optimizer &optimizer,
observe_gradient *gradient,
const std::vector<spin_op> &poolList,
optim::optimizer &optimizer, observe_gradient *gradient,
const adapt_options options = adapt_options()) {

AdaptKernel kernel;
Expand Down Expand Up @@ -112,7 +112,8 @@ auto adapt_vqe(const InitialState &initialState, const spin_op &H,

template <typename InitialState>
auto adapt_vqe(const InitialState &initialState, const spin_op &H,
const std::vector<spin_op> &operatorPool, optim::optimizer &optimizer,
const std::vector<spin_op> &operatorPool,
optim::optimizer &optimizer,
const adapt_options options = adapt_options()) {
return adapt_vqe(initialState, H, operatorPool, optimizer, nullptr, options);
}
Expand Down
1 change: 0 additions & 1 deletion cudaqlib/gse/utils/pools/spin_complement_gsd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ std::vector<spin_op> spin_complement_gsd::generate(

auto numOrbitals = std::any_cast<std::size_t>(iter->second);


std::vector<spin_op> pool;
auto numQubits = 2 * numOrbitals;
std::vector<int> alphaOrbs, betaOrbs;
Expand Down
2 changes: 1 addition & 1 deletion cudaqlib/operators/chemistry/MoleculePackageDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class MoleculePackageDriver : public extension_point<MoleculePackageDriver> {

CUDAQ_DEFINE_EXTENSION_IMPL(MoleculePackageDriver)

#define CUDAQ_REGISTER_MOLECULEPACKAGEDRIVER(TYPE) \
#define CUDAQ_REGISTER_MOLECULEPACKAGEDRIVER(TYPE) \
static inline const std::string class_identifier = #TYPE; \
static std::unique_ptr<MoleculePackageDriver> create() { \
return std::make_unique<TYPE>(); \
Expand Down
4 changes: 2 additions & 2 deletions cudaqlib/operators/chemistry/molecule.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#pragma once

#include "cudaqlib/operators/fermion/fermion_op.h"
#include "cudaq/spin_op.h"
#include "cudaqlib/operators/fermion/fermion_op.h"

#include <optional>

Expand Down Expand Up @@ -39,7 +39,7 @@ class molecular_geometry {
auto begin() const { return atoms.cbegin(); };
auto end() const { return atoms.cend(); }
std::string name() const;
static molecular_geometry from_xyz(const std::string& xyzFile);
static molecular_geometry from_xyz(const std::string &xyzFile);
};

/// @brief The `molecular_hamiltonian` type holds all the pertinent
Expand Down
1 change: 0 additions & 1 deletion cudaqlib/operators/fermion/fermion_to_spin.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class fermion_to_spin : public extension_point<fermion_to_spin> {
/// generate an equivalent operator on spins.
virtual spin_op generate(const fermion_op &fermionOp) = 0;
virtual ~fermion_to_spin() {}

};

CUDAQ_DEFINE_EXTENSION_IMPL(fermion_to_spin)
Expand Down
2 changes: 1 addition & 1 deletion cudaqlib/optim/optimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class optimizer : public extension_point<optimizer> {

CUDAQ_DEFINE_EXTENSION_IMPL(optimizer)

#define CUDAQ_REGISTER_OPTIMIZER(TYPE) \
#define CUDAQ_REGISTER_OPTIMIZER(TYPE) \
static inline const std::string class_identifier = #TYPE; \
static std::unique_ptr<optimizer> create() { \
return std::make_unique<TYPE>(); \
Expand Down
2 changes: 1 addition & 1 deletion cudaqlib/utils/extension_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class extension_point {

#define CONCAT(a, b) CONCAT_INNER(a, b)
#define CONCAT_INNER(a, b) a##b
#define CUDAQ_DEFINE_EXTENSION_IMPL(TYPE) \
#define CUDAQ_DEFINE_EXTENSION_IMPL(TYPE) \
namespace details { \
template <class T> \
class CONCAT(TYPE, _impl) : public TYPE { \
Expand Down
2 changes: 1 addition & 1 deletion cudaqlib/utils/library_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ inline static std::string getCUDAQLibraryPath() {
return data.path;
}

} // namespace cudaq::__internal__
} // namespace cudaqlib::__internal__
2 changes: 1 addition & 1 deletion tests/gse/AdaptTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <cmath>
#include <gtest/gtest.h>

#include "cudaqlib/gse.h"
#include "cudaq.h"
#include "cudaqlib/gse.h"

TEST(GSETester, checkSimpleAdapt) {

Expand Down
2 changes: 1 addition & 1 deletion tests/gse/VQETester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <cmath>
#include <gtest/gtest.h>

#include "cudaqlib/gse.h"
#include "cudaq.h"
#include "cudaqlib/gse.h"

TEST(GSETester, checkVqe) {

Expand Down
2 changes: 1 addition & 1 deletion tests/optim/OptimTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <cmath>
#include <gtest/gtest.h>

#include "cudaqlib/optim.h"
#include "cudaq.h"
#include "cudaqlib/optim.h"

TEST(OptimTester, checkLBFGS) {

Expand Down

0 comments on commit bd533ee

Please sign in to comment.