| 2 | #include "Core/QuantumCircuit/QuantumGate.h" |
| 3 | using namespace std; |
| 4 | USING_QPANDA |
| 5 | |
| 6 | QGate QNodeDeepCopy::copy_node(shared_ptr<AbstractQGateNode>cur_node) |
| 7 | { |
| 8 | QVec qubit_vector; |
| 9 | cur_node->getQuBitVector(qubit_vector); |
| 10 | QVec control_qubit_vector; |
| 11 | cur_node->getControlVector(control_qubit_vector); |
| 12 | |
| 13 | QGate temp_gate = copy_qgate(cur_node->getQGate(), qubit_vector); |
| 14 | temp_gate.setControl(control_qubit_vector); |
| 15 | temp_gate.setDagger(cur_node->isDagger()); |
| 16 | return temp_gate; |
| 17 | } |
| 18 | |
| 19 | QMeasure QNodeDeepCopy::copy_node(shared_ptr<AbstractQuantumMeasure> cur_node) |
| 20 | { |
no test coverage detected