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.is_pauli — Method
YaoBlocks.Optimise.replace_block — Method
replace_block(actor, tree::AbstractBlock) -> AbstractBlock
replace_block(pair::Pair{Type{ST}, TT}, tree::AbstractBlock) -> AbstractBlockreplace 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).
YaoBlocks.Optimise.simplify — Method
simplify(block[; rules=__default_simplification_rules__])Simplify a block tree accroding to given rules, default to use YaoBlocks.Optimise.__default_simplification_rules__.
YaoBlocks.Optimise.to_basictypes — Function
to_basictypes(block::AbstractBlock)convert gates to basic types
* ChainBlock
* PutBlock
* PrimitiveBlocksource