| Safe Haskell | None |
|---|
Quipper.Algorithms.BWT.Simulate
Description
This module contains functions for simulating and debugging BWT oracles.
Synopsis
- simulate_edges :: GateBase -> Oracle -> IO ()
- render_oracle :: GateBase -> Bool -> Oracle -> Document ()
- simulate_parseNodeRoot :: Int -> IO ()
- simulate_parseNodeEven :: Int -> IO ()
- simulate_testIsParent :: Int -> IO ()
- simulate_testIsChild :: Int -> IO ()
- simulate_setParent :: Int -> IO ()
- simulate_setChild :: Int -> IO ()
- simulate_setChildInTree :: Int -> IO ()
- simulate_setWeld :: Int -> IO ()
- simulate_doWeld1 :: Int -> IO ()
- simulate_doWeld0 :: Int -> IO ()
- simulate_cAddNum :: Int -> IO ()
- simulate_cSubNum :: Int -> IO ()
- hibit :: Integral a => Integral b => a -> b
- main_all :: Int -> IO ()
Generic simulation
simulate_edges :: GateBase -> Oracle -> IO () Source #
Inputs an oracle and prints out a list of colored edges in text
format. This is done by simulating the circuit for every possible
input, decomposed to the given GateBase.
Testing of specific circuit fragments
simulate_parseNodeRoot :: Int -> IO () Source #
Simulate parseNodeRoot on all possible inputs for tree height n.
simulate_parseNodeEven :: Int -> IO () Source #
Simulate parseNodeEven on all possible inputs for tree height n.
simulate_testIsParent :: Int -> IO () Source #
Simulate testIsParent on all possible inputs for tree height n.
simulate_testIsChild :: Int -> IO () Source #
Simulate testIsChild on all possible inputs for tree height n.
simulate_setParent :: Int -> IO () Source #
Simulate setParent on all possible inputs for tree height n.
simulate_setChild :: Int -> IO () Source #
Simulate setChild on all possible inputs for tree height n.
simulate_setChildInTree :: Int -> IO () Source #
Simulate setChildInTree on all possible inputs for tree height n.
simulate_cAddNum :: Int -> IO () Source #
Simulate cAddNum (including cAddNumClear) on all possible inputs for tree height n.
simulate_cSubNum :: Int -> IO () Source #
Simulate cSubNum (including cSubNumClear) on all possible inputs for tree height n.
Auxiliary functions
hibit :: Integral a => Integral b => a -> b Source #
Return the smallest number of bits required to hold the given integer.
Main functions
main_all :: Int -> IO () Source #
Run simulations of parseNodeRoot, parseNodeEven,
testIsParent, testIsChild, setParent, setChild,
setChildInTree, setWeld, doWeld0, doWeld1, cAddNum, and
cSubNum for tree height n.