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

Method cAlloc

Core/Core.cpp:150–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148
149
150ClassicalCondition QPanda::cAlloc()
151{
152 if (nullptr == global_quantum_machine)
153 {
154 QCERR("global_quantum_machine init fail");
155 throw init_fail("global_quantum_machine init fail");
156 }
157 return global_quantum_machine->allocateCBit();
158}
159
160ClassicalCondition QPanda::cAlloc(size_t stCBitaddr)
161{

Callers 8

test_grover1Method · 0.45
test_grover2Method · 0.45
test_grover_searchMethod · 0.45
test_quantum_walkMethod · 0.45

Calls 2

init_failClass · 0.85
allocateCBitMethod · 0.80

Tested by 7

test_grover1Method · 0.36
test_grover2Method · 0.36
test_grover_searchMethod · 0.36
test_quantum_walkMethod · 0.36