Reversible Logic Synthesis Benchmarks
you are in...
A simple application to view reversible circuits
RCViewer is intended to be a simple application to aid in the
visualization of reversible quantum circuits made up of Toffoli and
Fredkin gates in cascade
format. Currently it will display a simple image for a given circuit,
for now can save this image as a bitmap file. More gate support and
image format support is planned for the future.
RCViewer was written in C++ using the Windows Template Library, and
is currently available only for the Win32 platform.
RCViewer is free to distribute, although if you choose to distribute
over a web page, or some other large-scale form of distribution, I
it if you dropped me a note at
email@example.com to let me know. Neither myself nor UNB will accept any
responsibility for any harm caused by this program or the transfer
- Currently limited to cascades of generalized Toffoli and Fredkin
- Custom file format (.tfc). Syntax is provided with the sample
- Currently can save the circuit image as a 24-bit Bitmap file.
- Calculates the quantum cost of the circuit based on the latest
- View the output of a circuit in truth-table form
- Verify the output of a circuit against a PLA file
- Can change the appearance of the circuit by altering the colors,
size, and spacing of gates.
Everything is pretty simple and straightforward.
To open a circuit for viewing, click the folder icon on the toolbar
image), or select File/Open... from the menu bar, or use the shortcut:
By default, files with the extension of .tfc ("Toffoli-Fredkin
are listed, but any file extension is valid and will be attempted to be
Error messages will alert you to any parse errors.
To save a bitmap image of an open circuit, click the disk image icon
the toolbar, or select File/Save BMP... from the menu bar, or use the
Ctrl-S. The image will be saved as a 24-bit bitmap file. If no circuit
been opened, or if the circuit is empty (0 gates), this button does
To change the look of the circuit, select Edit/Preferences... from
the menu bar, or use the shortcut: Ctrl-E. Here you can change the:
To view the I/O of a circuit, click on the "IO" button on the toolbar,
select View/Input/Output from the menu bar, or use the shortcut:
values are listed ignoring the constant input lines, and output values
listed ignoring the garbage output variables.
- Colors. Separate colors can be chosen to draw: variable names,
constant values, garbage output, the lines themselves, gates, and the
Now you can show off your circuits in stylish hot-pink on yellow
should you so desire!
- Sizes and spaces. Change the size of: target symbols, control
symbols. Change the space: between lines (vertical), and between gates
- Ordering. Have the variables drawn from top-to-bottom (in the
specified in the tfc file) or from bottom-to-top.
To compare the output of a circuit to a PLA file, click the "PLA"
button on the toolbar, or select File/Verify With PLA... from the menu
bar. The program
will try and match output variables from the currently opened circuit
the output lines from the chosen PLA file. If successful, the program
report which Circuit output lines map to which PLA output lines.
Otherwise, the program will report that the circuit and PLA files do
not have equivalent output.
To view the cost statistics of an open circuit, click the "Q" icon
toolbar, or select View/Quantum Cost, or use the shortcut: Ctrl-Q. A
box will appear, telling you: the gate count of the circuit, the number
garbage bits, and the estimated quantum cost taken from the latest
The circuit image will wrap if it is longer than the window's width
well as a bit of bordering space.) However, if the window is too small
than 200 pixels, technically,) the circuit will not be drawn at all.
bitmap files will appear exactly as they do in the window (only without
excess whitespace), so be sure to play with the window size and the
to produce the image you want.
- Provide more image format options for saving
- Clean up some of the code structure, open it up to allow for
addition of gate types
- 1.0 - First version. Supports Toffoli and Fredkin gates only.
Supports bitmap files for image saving. Can customize color and spacing
of gates and
- 1.01 - Added ParseException for including a .c list in the file
there are no constants expected. Added option to list variables from
top-to-bottom or bottom-to-top.
- 1.02 - Fixed silly bug when drawing Fredkin gates from bottom to
- 1.1 - Added Input/Output viewing and PLA file verification
- 1.11 - Improved PLA parsing. Sped up scrolling through IO for
circuits. Tweaked default preferences.
- 1.12 - Reverted I/O viewing to text. Fixed some scrolling bugs.
- 1.13 - Optional Output variable tags added.
- 1.132 - The quantum cost table was updated based on the new results.
- 1.14 - The quantum cost table was updated based on the newer results.
Last updated: January 7, 2005
Author: Nathan Scott
Comments\Bugs? Email: firstname.lastname@example.org