QuipperLib.ClassicalOptim.Simplification

Auxiliary definitions

trace

moveWire

flipCtl

moveWireFlip

Small, simple optimizations

suppress_garbage

suppressGarbageGates

Compression of wire numbering

getAllWires

getInitWires

getInputWires

compressWires

A useful data structure

type GateId

type GateIdSet

type UsedWire

gateIdFindMin

gateIdFindMax

pairUsedWire

firstUsedWire

lastUsedWire

nextUsedGate

circuitControlWires

circuitNotWires

Algebraic optimization method

exp_length

exp_list_and

expEvalCtl

expEvalGate

State of the optimization automaton

data ExpState

initExpState

The state monad

data EvalCirc a

Low-level access functions

runEvalCirc

getExpState

setExpState

Higher-level access functions

newFreshVar

pullNewGate

changeFuture

updateFuture

storeOldGate

incrGateId

getAllWiresInCirc

setAllWiresInCirc

removeFromAllWiresInCirc

getExpMap

setExpMap

updateUsedControlWires

updateUsedNotWires

updateOutWires

addToSkipGates

sendEndOfTime

shiftGate

Auxiliary functions

pairEqualExp

pruneListExp

The algebraic optimization automaton

stepEvalCirc

stepSwapCirc

stepSwapCirc_simple

Some wrappers

runWhile

stripNoOp

alg_simplify

alg_swap

alg_swap_simple

Multi-pass optimization

is_equal_list

get_list_init

simplRec'

simplRec