| 271 | } |
| 272 | |
| 273 | prob_vec QPanda::probRunList(QProg & qProg, QVec vQubit, int selectMax) |
| 274 | { |
| 275 | if (nullptr == global_quantum_machine) |
| 276 | { |
| 277 | QCERR("global_quantum_machine init fail"); |
| 278 | throw init_fail("global_quantum_machine init fail"); |
| 279 | } |
| 280 | auto temp = dynamic_cast<IdealMachineInterface *>(global_quantum_machine); |
| 281 | if (nullptr == temp) |
| 282 | { |
| 283 | QCERR("global_quantum_machine is not ideal machine"); |
| 284 | throw runtime_error("global_quantum_machine is not ideal machine"); |
| 285 | } |
| 286 | return temp->probRunList(qProg, vQubit, selectMax); |
| 287 | } |
| 288 | prob_dict QPanda::probRunDict(QProg & qProg, QVec vQubit, int selectMax) |
| 289 | { |
| 290 | if (nullptr == global_quantum_machine) |