The Quipper System

Safe HaskellNone

Quipper.Algorithms.BWT.Simulate

Contents

Description

This module contains functions for simulating and debugging BWT oracles.

Synopsis

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.

render_oracle :: GateBase -> Bool -> Oracle -> Document () Source #

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 :: 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_setWeld :: Int -> IO () Source #

Simulate setWeld on all possible inputs for tree height n.

simulate_doWeld1 :: Int -> IO () Source #

Simulate doWeld1 on all possible inputs for tree height n.

simulate_doWeld0 :: Int -> IO () Source #

Simulate doWeld0 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