Commit e7747790 authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

adding precompiled header for qcor lang ext deps

parent b7d3011f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ antlrcpp::Any qasm3_visitor::visitAliasStatement(
                                     in_indexIdentifierContext) {
        // Helper to determine the qreg size
        const auto get_qreg_size = [&](const std::string &qreg_name) {
          uint64_t nqubits;
          uint64_t nqubits = 0;
          auto qreg_value = symbol_table.get_symbol(qreg_name);
          if (auto op = qreg_value.getDefiningOp<mlir::quantum::QallocOp>()) {
            nqubits = op.size().getLimitedValue();
+1 −1
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ antlrcpp::Any qasm3_visitor::visitQuantumMeasurementAssignment(
      // This is the case where we are measuring an entire qubit array
      // to a bit array
      // First check that the sizes match up
      std::uint64_t nqubits;
      std::uint64_t nqubits = 0;
      if (auto qalloc_op = value.getDefiningOp<mlir::quantum::QallocOp>()) {
        nqubits = qalloc_op.size().getLimitedValue();
      } else {
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ void qasm3_visitor::createInstOps_HandleBroadcast(

  auto get_qreg_size = [&, this](mlir::Value qreg_value,
                                 const std::string qreg_name) {
    uint64_t nqubits;
    uint64_t nqubits = 0;
    if (auto op = qreg_value.getDefiningOp<mlir::quantum::QallocOp>()) {
      nqubits = op.size().getLimitedValue();
    } else {
+4 −1
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ file(GLOB HEADERS qcor.hpp
                  observable/qcor_observable.hpp 
                  optimizer/qcor_optimizer.hpp 
                  kernel/quantum_kernel.hpp 
                  qcor_lang_ext.hpp
                  objectives/objective_function.hpp 
                  objectives/gradient_function.hpp
                  execution/taskInitiate.hpp
@@ -51,6 +52,8 @@ file(GLOB HEADERS qcor.hpp

install(FILES ${HEADERS} DESTINATION include/qcor)
install(TARGETS ${LIBRARY_NAME} DESTINATION lib)
install(CODE "execute_process(COMMAND ${LLVM_INSTALL_PREFIX}/bin/clang++ -std=c++17 -x c++-header ${CMAKE_SOURCE_DIR}/runtime/qcor_lang_ext.hpp -o ${CMAKE_BINARY_DIR}/runtime/qcor_lang_ext.hpp.pch -I ${XACC_ROOT}/include/xacc -I ${XACC_ROOT}/include/qcor -I ${XACC_ROOT}/include/eigen)")
install(FILES ${CMAKE_BINARY_DIR}/runtime/qcor_lang_ext.hpp.pch DESTINATION include/qcor)

if (QCOR_BUILD_TESTS)
  add_subdirectory(tests)
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ class ObjectiveFunction : public xacc::Identifiable {
  // evaluated quantum kernel
  std::shared_ptr<CompositeInstruction> kernel;

  // non-owning
  Operator observable;

  HeterogeneousMap options;
Loading