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

Method Measure

Core/QuantumCircuit/QuantumMeasure.cpp:23–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21USING_QPANDA
22using namespace std;
23QMeasure QPanda::Measure(Qubit * target_qubit,ClassicalCondition classical_cond)
24{
25 auto target_cbit = classical_cond.getExprPtr()->getCBit();
26 if (nullptr == target_cbit)
27 {
28 QCERR("param error");
29 throw invalid_argument("param error");
30 }
31 QMeasure measure(target_qubit, target_cbit);
32 return measure;
33}
34
35QMeasure QPanda::Measure(Qubit * target_qubit, CBit* classical_cond)
36{

Callers 2

test_grover2Method · 0.45
meas_allFunction · 0.45

Calls 4

getExprPtrMethod · 0.80
get_cbit_by_addrMethod · 0.80
get_qubit_by_addrMethod · 0.80
getCBitMethod · 0.45

Tested by 1

test_grover2Method · 0.36