| 457 | |
| 458 | |
| 459 | std::vector<double> QCloudMachine::pec_error_mitigation( |
| 460 | QProg& prog, |
| 461 | int shots, |
| 462 | std::vector<std::string> expectations, |
| 463 | RealChipType chip_id, |
| 464 | std::string task_name) |
| 465 | { |
| 466 | real_chip_task_validation(shots, prog); |
| 467 | |
| 468 | //convert prog to originir |
| 469 | auto prog_str = convert_qprog_to_originir(prog, this); |
| 470 | |
| 471 | QVec qubits; |
| 472 | std::vector<ClassicalCondition> cbit_vector; |
| 473 | auto qubits_num = prog.get_used_qubits(qubits); |
| 474 | auto cbits_num = prog.get_used_cbits(cbit_vector); |
| 475 | |
| 476 | m_cloud_imp->object_init(qubits_num, cbits_num, prog_str, task_name); |
| 477 | |
| 478 | try |
| 479 | { |
| 480 | std::vector<double> result; |
| 481 | m_cloud_imp->execute_error_mitigation(result, shots, chip_id, expectations, {}, EmMethod::PEC); |
| 482 | return result; |
| 483 | } |
| 484 | catch (const std::exception& e) |
| 485 | { |
| 486 | QCERR_AND_THROW(run_fail, e.what()); |
| 487 | } |
| 488 | } |
| 489 | |
| 490 | //read out |
| 491 | std::map<std::string, double> QCloudMachine::read_out_error_mitigation( |
nothing calls this directly
no test coverage detected