local_fold¶
- local_fold(dag, scale, *, selection='random', exclude=None, rng=None)[source]¶
Apply
LocalFoldPassand return(folded_dag, effective_scale).For use with
ZNEviafunctools.partialwhen customisingselection/exclude/rng:from functools import partial zne = ZNE( scale_factors=[1.0, 1.5, 2.0], folding_fn=partial(local_fold, selection="from_left"), )
Mutates
dagin place (deepcopy first if the original is needed).- Return type: