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 — Methodis_pauli(x)Check if x is an element of pauli group.
YaoBlocks.Optimise.replace_block — Methodreplace_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 — Methodsimplify(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 — Functionto_basictypes(block::AbstractBlock)convert gates to basic types
* ChainBlock
* PutBlock
* PrimitiveBlock