Loading examples/qcor_demos/pirq_workshop/qir_qasm3/demo3_lang_integration/2_qcor_call_qasm3_qpe/qpe.cpp +1 −1 Original line number Diff line number Diff line #include "qir_nisq_kernel_utils.hpp" // Compile: // qcor qft.qasm qpe.cpp -shots 1024 // qcor iqft.qasm qpe.cpp -shots 1024 using QPEOracleSignature = KernelSignature<qubit>; // External QASM3 function with signature void(qreg, int) Loading mlir/parsers/qasm3/utils/symbol_table.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,9 @@ std::optional<size_t> ScopedSymbolTable::get_qreg_size(const std::string &qreg_n void ScopedSymbolTable::invalidate_qubit_extracts( const std::string &qreg_name, const std::vector<int> &indices) { if (!get_qreg_size(qreg_name).has_value()) { return; } if (indices.empty()) { const auto reg_size = get_qreg_size(qreg_name).value(); for (size_t i = 0; i < reg_size; ++i) { Loading Loading
examples/qcor_demos/pirq_workshop/qir_qasm3/demo3_lang_integration/2_qcor_call_qasm3_qpe/qpe.cpp +1 −1 Original line number Diff line number Diff line #include "qir_nisq_kernel_utils.hpp" // Compile: // qcor qft.qasm qpe.cpp -shots 1024 // qcor iqft.qasm qpe.cpp -shots 1024 using QPEOracleSignature = KernelSignature<qubit>; // External QASM3 function with signature void(qreg, int) Loading
mlir/parsers/qasm3/utils/symbol_table.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -224,6 +224,9 @@ std::optional<size_t> ScopedSymbolTable::get_qreg_size(const std::string &qreg_n void ScopedSymbolTable::invalidate_qubit_extracts( const std::string &qreg_name, const std::vector<int> &indices) { if (!get_qreg_size(qreg_name).has_value()) { return; } if (indices.empty()) { const auto reg_size = get_qreg_size(qreg_name).value(); for (size_t i = 0; i < reg_size; ++i) { Loading