Japanese
言語
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.dagcircuit.DAGCircuit.size

DAGCircuit.size(*, recurse=False)[ソース]

Return the number of operations. If there is control flow present, this count may only be an estimate, as the complete control-flow path cannot be statically known.

パラメータ

recurse (bool) – if True, then recurse into control-flow operations. For loops with known-length iterators are counted unrolled. If-else blocks sum both of the two branches. While loops are counted as if the loop body runs once only. Defaults to False and raises DAGCircuitError if any control flow is present, to avoid silently returning a mostly meaningless number.

戻り値

the circuit size

戻り値の型

int

例外

DAGCircuitError – if an unknown ControlFlowOp is present in a call with recurse=True, or any control flow is present in a non-recursive call.