Commit 3622d174 authored by Nguyen, Thien Minh's avatar Nguyen, Thien Minh
Browse files

Removed QAOA and Rotoselect Obj Func



We will use VQE instead.

Signed-off-by: default avatarNguyen, Thien <nguyentm@ornl.gov>
parent 4128297a
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
add_subdirectory(vqe)
 No newline at end of file
add_subdirectory(qaoa)
add_subdirectory(rotoselect)
 No newline at end of file
+0 −58
Original line number Diff line number Diff line
# *******************************************************************************
# Copyright (c) 2019 UT-Battelle, LLC.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# and Eclipse Distribution License v.10 which accompany this distribution.
# The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
# and the Eclipse Distribution License is available at
# https://eclipse.org/org/documents/edl-v10.php
#
# Contributors:
#   Alexander J. McCaskey - initial API and implementation
# *******************************************************************************/
set(LIBRARY_NAME qcor-qaoa-objective)

file(GLOB SRC *.cpp)

usfunctiongetresourcesource(TARGET ${LIBRARY_NAME} OUT SRC)
usfunctiongeneratebundleinit(TARGET ${LIBRARY_NAME} OUT SRC)

add_library(${LIBRARY_NAME} SHARED ${SRC})

target_include_directories(
  ${LIBRARY_NAME}
  PUBLIC . ../..)

target_link_libraries(${LIBRARY_NAME} PUBLIC qcor CppMicroServices::CppMicroServices)

set(_bundle_name qcor_qaoa_objective)
set_target_properties(${LIBRARY_NAME}
                      PROPERTIES COMPILE_DEFINITIONS
                                 US_BUNDLE_NAME=${_bundle_name}
                                 US_BUNDLE_NAME
                                 ${_bundle_name})

usfunctionembedresources(TARGET
                         ${LIBRARY_NAME}
                         WORKING_DIRECTORY
                         ${CMAKE_CURRENT_SOURCE_DIR}
                         FILES
                         manifest.json)


if(APPLE)
  set_target_properties(${LIBRARY_NAME}
                        PROPERTIES INSTALL_RPATH "@loader_path/../lib")
  set_target_properties(${LIBRARY_NAME}
                        PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
else()
  set_target_properties(${LIBRARY_NAME}
                        PROPERTIES INSTALL_RPATH "$ORIGIN/../lib")
  set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-shared")
endif()

if (QCOR_BUILD_TESTS) 
  add_subdirectory(tests)
endif()

install(TARGETS ${LIBRARY_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/plugins)
+0 −6
Original line number Diff line number Diff line
{
  "bundle.symbolic_name" : "qcor_qaoa_objective",
  "bundle.activator" : true,
  "bundle.name" : "QAOA Objective Function",
  "bundle.description" : ""
}

runtime/objectives/qaoa/qaoa.cpp

deleted100644 → 0
+0 −52
Original line number Diff line number Diff line
#include "qcor.hpp"

#include "cppmicroservices/BundleActivator.h"
#include "cppmicroservices/BundleContext.h"
#include "cppmicroservices/ServiceProperties.h"

#include <memory>
#include <set>

using namespace cppmicroservices;


namespace qcor {

class QAOA : public ObjectiveFunction {
protected:
  double operator()() override {
    // TODO
    return 0.0;
  }
public:
  const std::string name() const override { return "qaoa"; }
  const std::string description() const override { return ""; }
};


} // namespace qcor

namespace {

/**
 */
class US_ABI_LOCAL QAOAObjectiveActivator : public BundleActivator {

public:
  QAOAObjectiveActivator() {}

  /**
   */
  void Start(BundleContext context) {
    auto xt = std::make_shared<qcor::QAOA>();
    context.RegisterService<qcor::ObjectiveFunction>(xt);
  }

  /**
   */
  void Stop(BundleContext /*context*/) {}
};

} // namespace

CPPMICROSERVICES_EXPORT_BUNDLE_ACTIVATOR(QAOAObjectiveActivator)
+0 −5
Original line number Diff line number Diff line
link_directories(${XACC_ROOT}/lib)
add_executable(QAOAObjTester QAOATester.cpp)
add_test(NAME qcor_QAOAObjTester COMMAND QAOAObjTester)
target_include_directories(QAOAObjTester PRIVATE ${XACC_ROOT}/include/gtest)
target_link_libraries(QAOAObjTester ${XACC_TEST_LIBRARIES} qcor)
Loading