Skip to content

bloqade.qasm2.passes.fold.QASM2Fold

← Module overview

classQASM2Foldsource

bloqade.qasm2.passes.fold.QASM2Fold

Bases: Pass

Fold pass for qasm2.extended

Signature
class QASM2Fold(inline_gate_subroutine: bool = True, unroll_ifs: bool = True)

Parameters

NameTypeDefaultDescription
inline_gate_subroutineboolTrue
unroll_ifsboolTrue

Attributes

NameTypeDefaultDescription
inline_gate_subroutineboolTrue
unroll_ifsboolTrue
aggressive_unrollAggressiveUnrollfield(init=False)

methodunsafe_runsource

bloqade.qasm2.passes.fold.QASM2Fold.unsafe_run

def unsafe_run(mt: Method) -> RewriteResult

Parameters

NameTypeDescription
mtMethod

Returns

RewriteResult

source