# Reversible Circuit Simulation (for classical tests of quantum subroutines)

Problem: trying to implement and test quantum subroutines on quantum simulators I run into multiple challenges:

1. Quantum simulation is a very hard problem: a very low number of simulated qubits is supported
2. The toolkit does not offer arithmetic operations, often not even a structure representing numbers, e.g., a "quantum" integer. The simulators work on basis of distinct qubits only.

Solution: Assuming I am interested in translating a classical subroutine into a quantum circuit. The translation can be done without the use of entanglement and thus it would be sufficient to simulate a reversible ciruit (hence remove the overhead of simulating superpositons). Merely testing for functionality of such a translation does not require quantum effects.

Looking for: I am looking a tool(kit) that allows to construct and simulate reversible circuits for a large (a few thousands) number of (qu)bits. The toolkit should, if possible, allow the following:

• (Classical) simulation of the circuit
• Definition of subroutines (functions)
• Definition of structures (e.g. array of (qu)bits to represent an integer)
• Support a gate set that allows to construct arbitrary operations, e.g., Toffoli (no need to create superpositions though)
• Predefined (reversible) arithmetic operations (optional)
• GUI representation of the circuits, drag and drop (optional)

I would also be happy about a quantum simulator that allows to restrict to "classical" simualtion. Perhaps a quantum simulator is overkill and there are "classical" circuit construction tools that allow me to do this very easily (maybe VHDL?).

Question: Can anyone point me to simulators for reversible circuits?

I am aware of the extensive list of quantum simulators in quantiki, and must admit, that I did not try all of them. However, I do have some experience with the following:

Microsoft Liquid

• Plenty example code
• can simulate $$\approx 22$$ qubits (on my laptop)
• can restrict oneself to stabilizer circuits (Clifford group) for larger number of qubits, but that does not give me Toffoli gates :(

Microsoft QSharp Programming Language

• can simulate $$< 30$$ qubits
• allows construction of structs; has integer/ floating-point representations
• predefined quantum arithmetic

Simulator University Linz

• seems to allow to simulate larger number of qubits for certain problem
• poorly documented
• only (qu)bit level operations
• not actively developed

revkit/ cirkit RevKit

• apparently simulation for reversible circuits
• has a GUI representation of circuits
• did not actually get this to run (only the gui)

Drag an Drop Quirk

• GUI cuircit representation
• allows to defined functions
• works very well for small examples (great tool!)

IBM Qiskit

• GUI circuit representation
• allows to define structures and functions
• no predefined arithmetic operations, but sample code for addition/ multiplication etc available on githut
• simulation limited to $$< 30$$ (qu)bits

• It supports a limited set of primitive gates (X, CNOT and Toffoli gates, as well as other gates when their effect is X or identity), measurements in the computational basis and DumpMachine to output the state of the simulator.
• It is available with IQ# and from qsharp Python package using %toffoli magic command and toffoli_simulate method, respectively.