MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / copy_node

Method copy_node

Core/QuantumCircuit/QNodeDeepCopy.cpp:4–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "Core/QuantumCircuit/QuantumGate.h"
3using namespace std;
4USING_QPANDA
5
6QGate 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
19QMeasure QNodeDeepCopy::copy_node(shared_ptr<AbstractQuantumMeasure> cur_node)
20{

Callers 4

phase3Method · 0.80
deepCopyQNodeMethod · 0.80
deepCopyFunction · 0.80

Calls 15

copy_qgateFunction · 0.85
QMeasureClass · 0.85
QResetClass · 0.85
ClassicalConditionClass · 0.85
QWhileProgClass · 0.85
QIfProgClass · 0.85
ClassicalProgClass · 0.85
getQuBitVectorMethod · 0.80
getCExprMethod · 0.80
deepcopyMethod · 0.80
getExprPtrMethod · 0.80
getTrueBranchMethod · 0.80

Tested by

no test coverage detected