OriginQ / QPanda-2

QPanda 2 is an open source quantum computing framework developed by OriginQC that can be used to build, run, and optimize quantum algorithms.
https://originqc.com.cn/en/quantum_soft.html?type=qpanda&lv2id=43&lv3id=72
Apache License 2.0
1.15k stars 92 forks source link

为什么你们的CloudMachine在使用的时候一直报错 #236

Open bwatchor opened 10 months ago

bwatchor commented 10 months ago

QPanda

基本信息

Bug是什么?

我在按照你们的测试用例使用CloudMachine的时候一直报错

复现Bug的步骤?

auto machine = QCloudMachine(); machine.init("api填写自己的“, true);

machine.set_qcloud_api("https://qcloud.originqc.com");

auto qlist = machine.allocateQubits(4);
auto clist = machine.allocateCBits(4);
auto measure_prog = QProg();
measure_prog << HadamardQCircuit(qlist)
    << CZ(qlist[2], qlist[3])
    << Measure(qlist[0], clist[0]);

auto pmeasure_prog = QProg();
pmeasure_prog << HadamardQCircuit(qlist)
    << CZ(qlist[1], qlist[3])
    << RX(qlist[2], PI / 4)
    << RX(qlist[1], PI / 4);

auto result0 = machine.full_amplitude_measure(measure_prog, 100);

建议的解决方案

pyQPanda

基本信息

Bug是什么?

QCloudMachine.cpp 210 QPanda::QCloudMachine::full_amplitude_measure curl_easy_perform() failed: Couldn't resolve host name unknown file: error: C++ exception with description "curl_easy_perform() failed: Couldn't resolve host name run error" thrown in the test body.

复现Bug的步骤?

建议的解决方案

ArrowYL commented 1 month ago

你好,根据你的代码,这一行不需要 machine.set_qcloud_api("https://qcloud.originqc.com");

默认会使用oriqin-qcloud官方的云平台地址,这样设置网络会没有反应