Simplification

The simplification for YaoBlocks is currently implemented in a limited and straightforward fashion, there is only one interface simplify to call.

APIs

YaoBlocks.Optimise.replace_blockMethod
replace_block(actor, tree::AbstractBlock) -> AbstractBlock
replace_block(pair::Pair{Type{ST}, TT}, tree::AbstractBlock) -> AbstractBlock

replace blocks in a circuit, where actor is a function that given input block, returns the block to replace, or nothing for skip replacing and visit sibling. If pair is provided, then replace original block with type ST with new block (pair.second).

source
YaoBlocks.Optimise.simplifyMethod
simplify(block[; rules=__default_simplification_rules__])

Simplify a block tree accroding to given rules, default to use YaoBlocks.Optimise.__default_simplification_rules__.

source