Reversible Logic Synthesis Benchmarks Page

you are in... Main\RCViewer Description


A simple application to view reversible circuits

Version 1.14

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, and for now can save this image as a bitmap file. More gate support and more image format support is planned for the future.

RCViewer was written in C++ using the Windows Template Library, and so is currently available only for the Win32 platform.

RCViewer is free to distribute, although if you choose to distribute it over a web page, or some other large-scale form of distribution, I would appreciate it if you dropped me a note at to let me know. Neither myself nor UNB will accept any responsibility for any harm caused by this program or the transfer thereof.


Circuit types: Image exporting: Quantum Cost: Output verification: Customization:


Everything is pretty simple and straightforward.

To open a circuit for viewing, click the folder icon on the toolbar (folder image), or select File/Open... from the menu bar, or use the shortcut: Ctrl-O. By default, files with the extension of .tfc ("Toffoli-Fredkin Cascades") are listed, but any file extension is valid and will be attempted to be parsed. Error messages will alert you to any parse errors.

To save a bitmap image of an open circuit, click the disk image icon on the toolbar, or select File/Save BMP... from the menu bar, or use the shortcut: Ctrl-S. The image will be saved as a 24-bit bitmap file. If no circuit has been opened, or if the circuit is empty (0 gates), this button does nothing.

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, or select View/Input/Output from the menu bar, or use the shortcut: Ctrl-I. Input values are listed ignoring the constant input lines, and output values are listed ignoring the garbage output variables.

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 to the output lines from the chosen PLA file. If successful, the program will 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 on the toolbar, or select View/Quantum Cost, or use the shortcut: Ctrl-Q. A message box will appear, telling you: the gate count of the circuit, the number of garbage bits, and the estimated quantum cost taken from the latest tables.

The circuit image will wrap if it is longer than the window's width (as well as a bit of bordering space.) However, if the window is too small (narrower than 200 pixels, technically,) the circuit will not be drawn at all. Saved bitmap files will appear exactly as they do in the window (only without any excess whitespace), so be sure to play with the window size and the preferences to produce the image you want.

Future plans:

Version History

Last updated: January 7, 2005
Author: Nathan Scott
Comments\Bugs? Email: