| 1415 | } |
| 1416 | |
| 1417 | QGate QPanda::CR(Qubit* control_qubit, Qubit* targit_qubit, double theta) |
| 1418 | { |
| 1419 | string name = "CPHASE"; |
| 1420 | if (control_qubit == targit_qubit) |
| 1421 | { |
| 1422 | QCERR(" target bit is the same as the control bit"); |
| 1423 | throw invalid_argument(" target bit is the same as the control bit"); |
| 1424 | } |
| 1425 | return _gs_pGateNodeFactory->getGateNode(name, { control_qubit, targit_qubit }, theta); |
| 1426 | } |
| 1427 | |
| 1428 | QCircuit QPanda::CR(const QVec& targitBits_first, const QVec& targitBits_second, double theta) |
| 1429 | { |