MCPcopy Create free account
hub / github.com/QuEST-Kit/QuEST / getMaxNumTracedQubits

Function getMaxNumTracedQubits

tests/unit/calculations.cpp:343–352  ·  view source on GitHub ↗

@private

Source from the content-addressed store, hash-verified

341
342/// @private
343int getMaxNumTracedQubits(int numQubits) {
344
345 // cannot reduce all qubits, nor so many that the final qureg is
346 // illegally distributed (which we enforce even upon the testsed
347 // non-distributed Quregs for simplicity)
348
349 return std::min(
350 numQubits - 1,
351 numQubits - getLog2(getQuESTEnv().numNodes));
352}
353
354
355TEST_CASE( "calcPartialTrace", TEST_CATEGORY ) {

Callers 1

SECTIONFunction · 0.85

Calls 2

getLog2Function · 0.85
getQuESTEnvFunction · 0.85

Tested by

no test coverage detected