Skip to content

MarcoBarroca/Quantum-Calculator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quantum Calculator

screenshot

Quantum Calculator with QISKit.

Note

At this time, the program no longer works properly due to specification changes of QISkit.

There are plans to correspond current specification soon.

Overview

It is possible to add a natural number expressed by n Qubits. Since the result also needs to be represented by n Qubits, if it is more than n Qubits it will be Over Range (OR). The H button means that the Hadamard gate acts on the input gate, at that time the input gate simultaneously shows the state of (0, 1, 2, ... , 2^n-1), which enables quantum parallel computation.

Usage

python3 qc.py

In order to calculate on IBM Q quantum device, it is necessary to set API token. Please edit Qconfig.py.

Execution on the real device is possible by preparing Qconfig.py, but any operation using this program can not be guaranteed Please check it well before execution.

Requirement

git

How it works

In order to add or subtract, this program requires 2*n+2 Qubits quantum circuit where n is number of input qubits. The quantum algorithm of this adder was prepared with reference to quantum ripple-carry adder from Cuccaro et al, quant-ph/0410184.

Referece

Version History

  • 2018/03/03 v0.0.2 n Qubits + n Qubits = n Qubits addition and subtract support.
  • 2017/01/28 v0.0.1 3 Qubits + 3 Qubits = 3 Qubits addition supports.

Author

Hideto Manjo

Licence

Apache Licence 2.0

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%