Loading examples/quasimo/VqeWithAnsatzCircuit.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -31,5 +31,6 @@ int main(int argc, char **argv) { const auto energy = result.get<double>("energy"); std::cout << "Ground-state energy = " << energy << "\n"; qcor_expect(std::abs(energy + 1.7487) < 0.1); return 0; } No newline at end of file lib/quasimo/impls/workflow/iterative_qpe.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ IterativeQpeWorkflow::constructQpeTrotterCircuit( auto ctrlKernel = std::dynamic_pointer_cast<xacc::CompositeInstruction>( xacc::getService<xacc::Instruction>("C-U")); ctrlKernel->expand({ std::make_pair("U", trotterCir), std::make_pair("U", trotterCir->as_xacc()), std::make_pair("control-idx", static_cast<int>(ancBit)), }); Loading lib/quasimo/impls/workflow/qaoa.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ QaoaWorkflow::execute(const QuantumSimulationModel &model) { xacc::getService<xacc::Instruction>("qaoa")); qaoa_kernel->expand({{"nbQubits", model.observable->nBits()}, {"nbSteps", nbSteps}, {"cost-ham", model.observable}, {"cost-ham", std::dynamic_pointer_cast<xacc::Observable>( model.observable->get_as_opaque())}, {"parameter-scheme", parameterScheme}}); evaluator = getEvaluator(model.observable, config_params); size_t nParams = qaoa_kernel->nVariables(); Loading lib/quasimo/impls/workflow/qite.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,8 @@ QuantumSimulationResult QiteWorkflow::execute( auto acc = xacc::internal_compiler::get_qpu(); qite->initialize({{"accelerator", acc}, {"steps", nbSteps}, {"observable", observable}, {"observable", std::dynamic_pointer_cast<xacc::Observable>( observable->get_as_opaque())}, {"step-size", stepSize}}); // Approximate imaginary-time Hamiltonian Loading Loading @@ -183,7 +184,7 @@ QuantumSimulationResult QiteWorkflow::execute( constructPropagateCircuit(approxOps, model.user_defined_ansatz, stepSize); return {{"energy", energyAtStep.back()}, {"exp-vals", energyAtStep}, {"circuit", finalCircuit}}; {"circuit", finalCircuit->as_xacc()}}; } } // namespace QuaSiMo } // namespace qcor No newline at end of file tools/driver/qcor.in +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ def main(argv=None): verbose=False keep_bit_code_files=False baseLibs = ['-rdynamic', '-Wl,-rpath,@XACC_ROOT@/lib:@CMAKE_INSTALL_PREFIX@/lib:@LLVM_INSTALL_PREFIX@/lib:@CMAKE_INSTALL_PREFIX@/clang-plugins', '-L', '@CMAKE_INSTALL_PREFIX@/lib','-lqcor', '-lqrt', '-lqcor-jit', '-L', '@CMAKE_INSTALL_PREFIX@/lib','-lqcor', '-lqrt', '-lqcor-jit', '-lqcor-quasimo', '-L', '@XACC_ROOT@/lib', '-lxacc', '-lCppMicroServices', '-lxacc-quantum-gate', '-lxacc-pauli', '-lxacc-fermion', '-lpthread'] if '@CMAKE_SYSTEM_NAME@' != 'Darwin': Loading Loading
examples/quasimo/VqeWithAnsatzCircuit.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -31,5 +31,6 @@ int main(int argc, char **argv) { const auto energy = result.get<double>("energy"); std::cout << "Ground-state energy = " << energy << "\n"; qcor_expect(std::abs(energy + 1.7487) < 0.1); return 0; } No newline at end of file
lib/quasimo/impls/workflow/iterative_qpe.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -51,7 +51,7 @@ IterativeQpeWorkflow::constructQpeTrotterCircuit( auto ctrlKernel = std::dynamic_pointer_cast<xacc::CompositeInstruction>( xacc::getService<xacc::Instruction>("C-U")); ctrlKernel->expand({ std::make_pair("U", trotterCir), std::make_pair("U", trotterCir->as_xacc()), std::make_pair("control-idx", static_cast<int>(ancBit)), }); Loading
lib/quasimo/impls/workflow/qaoa.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -36,7 +36,8 @@ QaoaWorkflow::execute(const QuantumSimulationModel &model) { xacc::getService<xacc::Instruction>("qaoa")); qaoa_kernel->expand({{"nbQubits", model.observable->nBits()}, {"nbSteps", nbSteps}, {"cost-ham", model.observable}, {"cost-ham", std::dynamic_pointer_cast<xacc::Observable>( model.observable->get_as_opaque())}, {"parameter-scheme", parameterScheme}}); evaluator = getEvaluator(model.observable, config_params); size_t nParams = qaoa_kernel->nVariables(); Loading
lib/quasimo/impls/workflow/qite.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -82,7 +82,8 @@ QuantumSimulationResult QiteWorkflow::execute( auto acc = xacc::internal_compiler::get_qpu(); qite->initialize({{"accelerator", acc}, {"steps", nbSteps}, {"observable", observable}, {"observable", std::dynamic_pointer_cast<xacc::Observable>( observable->get_as_opaque())}, {"step-size", stepSize}}); // Approximate imaginary-time Hamiltonian Loading Loading @@ -183,7 +184,7 @@ QuantumSimulationResult QiteWorkflow::execute( constructPropagateCircuit(approxOps, model.user_defined_ansatz, stepSize); return {{"energy", energyAtStep.back()}, {"exp-vals", energyAtStep}, {"circuit", finalCircuit}}; {"circuit", finalCircuit->as_xacc()}}; } } // namespace QuaSiMo } // namespace qcor No newline at end of file
tools/driver/qcor.in +1 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ def main(argv=None): verbose=False keep_bit_code_files=False baseLibs = ['-rdynamic', '-Wl,-rpath,@XACC_ROOT@/lib:@CMAKE_INSTALL_PREFIX@/lib:@LLVM_INSTALL_PREFIX@/lib:@CMAKE_INSTALL_PREFIX@/clang-plugins', '-L', '@CMAKE_INSTALL_PREFIX@/lib','-lqcor', '-lqrt', '-lqcor-jit', '-L', '@CMAKE_INSTALL_PREFIX@/lib','-lqcor', '-lqrt', '-lqcor-jit', '-lqcor-quasimo', '-L', '@XACC_ROOT@/lib', '-lxacc', '-lCppMicroServices', '-lxacc-quantum-gate', '-lxacc-pauli', '-lxacc-fermion', '-lpthread'] if '@CMAKE_SYSTEM_NAME@' != 'Darwin': Loading