Skip to content

Quantum Circuit Synthesis of binary functions using Reed Muller encoding

Notifications You must be signed in to change notification settings

mknambiar/qcktsynthesis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

qcktsynthesis

Quantum Circuit Synthesis of binary functions using Reed Muller encoding

Papers Referred

  1. An Algorithm for Synthesis of Reversible Logic Circuits. Pallav Gupta, Student Member, IEEE, Abhinav Agrawal, and Niraj K. Jha, Fellow, IEEE, IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, VOL. 25, NO. 11, NOVEMBER 2006
  2. Gate Optimization of NEQR Quantum Circuits via PPRM Transformation Shahab Iranmanesh1, Hossein Aghababa2, and Kazim Fouladi3, arXiv:2409.14629v1 [quant-ph] 22 Sep 2024

Running the program

  1. Just download all the python files in a folder.
  2. Navigate to the directory
  3. Type "python revopt.py"

Expected output

2024-12-09 00:17:38,485 - root - CRITICAL - - Testing: This is a critical message

Input function (Truth tables)

[0, 0, 1, 1, 0, 1, 0, 1]

[0, 1, 1, 0, 0, 0, 1, 1]

[1, 1, 1, 1, 0, 0, 0, 0]

Best solution path:

=======Qubit State=======

[[1], [0, 2], [1, 2]]

[[0], [1], [0, 2]]

[1, [2]]

gate operation : 2 = 2 xor []

=======Qubit State=======

[[0], [0, 2], [1, 2]]

[[1], [0, 2]]

[[2]]

gate operation : 1 = 1 xor [0, 2]

=======Qubit State=======

[[0], [1, 2]]

[[1]]

[[2]]

gate operation : 0 = 0 xor [1, 2]

=======Qubit State=======

[[0]]

[[1]]

[[2]]

How to understand this output:

Qubits are numbered starting from 0 upwards:

In a Qubit state and the input function truth table there are as many rows as qubits.

First row is for qubit 0, 2nd row for qubit 1 and so on.

Additional Info

In each row of a Qubit state we have a list of factors.

For example qubit state [[0], [1, 2]] in the first row means that qubit 0 represents the expression [0] xor [1, 2] in that state. [1, 2] means a boolean product of qubits 1 and 2

[] in the gate operation above means bit 1

Limitations

Only 1 test case has been tested. It should work. Try changing the inputs and see

About

Quantum Circuit Synthesis of binary functions using Reed Muller encoding

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages