Loading mlir/parsers/qasm3/visitor_handlers/alias_handler.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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(); Loading mlir/parsers/qasm3/visitor_handlers/measurement_handler.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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 { Loading mlir/parsers/qasm3/visitor_handlers/quantum_instruction_handler.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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 { Loading runtime/CMakeLists.txt +4 −1 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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) Loading runtime/objectives/objective_function.hpp +0 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ class ObjectiveFunction : public xacc::Identifiable { // evaluated quantum kernel std::shared_ptr<CompositeInstruction> kernel; // non-owning Operator observable; HeterogeneousMap options; Loading Loading
mlir/parsers/qasm3/visitor_handlers/alias_handler.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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(); Loading
mlir/parsers/qasm3/visitor_handlers/measurement_handler.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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 { Loading
mlir/parsers/qasm3/visitor_handlers/quantum_instruction_handler.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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 { Loading
runtime/CMakeLists.txt +4 −1 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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) Loading
runtime/objectives/objective_function.hpp +0 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ class ObjectiveFunction : public xacc::Identifiable { // evaluated quantum kernel std::shared_ptr<CompositeInstruction> kernel; // non-owning Operator observable; HeterogeneousMap options; Loading