The Quipper System

Algorithms.BWT.Simulate

Description

This module contains functions for simulating and debugging BWT oracles.

Synopsis

Generic simulation

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.

Input an oracle and output the colored edges in graphical format. This is done by simulating the circuit for every possible input. The second parameter is a boolean which determines whether the node numbering follows the schema of the orthodox oracle (True) or the simple oracle (False).

Testing of specific circuit fragments

Simulate parseNodeRoot on all possible inputs for tree height n.

Simulate parseNodeEven on all possible inputs for tree height n.

Simulate testIsParent on all possible inputs for tree height n.

Simulate testIsChild on all possible inputs for tree height n.

Simulate setParent on all possible inputs for tree height n.

Simulate setChild on all possible inputs for tree height n.

Simulate setChildInTree on all possible inputs for tree height n.

Simulate setWeld on all possible inputs for tree height n.

Simulate doWeld1 on all possible inputs for tree height n.

Simulate doWeld0 on all possible inputs for tree height n.

Simulate cAddNum (including cAddNumClear) on all possible inputs for tree height n.

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.