Skip to content

Implementation of a complete desk calculator with Qiskit

Notifications You must be signed in to change notification settings

lmarza/QuantumDeskCalculator

Repository files navigation

Quantum Desk Calculator with Qiskit

Problem definition

The task is to build a quantum circuit that performs the difference between the binary representation of two positive integers. The circuit can be defined as a variation of the quantum adder explained in class and using the Quantum Fourier Transform. The circuit must be implemented in qiskit and demonstrated on a one or two instances. The project can be extended with the implementation of a complete desk calculator.

Implementation details

Prerequisites

  • Python3.7+
  • qiskit

Operations implemented:

  • Addition Full Adder implementation
  • Addition using QFT
  • Subtraction using QFT
  • Multiplication using continuous QFT sum
  • Division using subtraction and addition implemented via QFT

Clone the repository

git clone https://github.com/LM095/QuantumDeskCalculator
cd QuantumDeskCalculator

Run the program

python quantumDeskCalculator.py

Example of esecution

Addition:

320 (101000000) + 150 (10010110) = 470(0111010110)

Subtraction:

1200 (10010110000) - 547 (1000100011) = 653 (001010001101)

Multiplication:

53 (110101) * 4 (100) = 212 (0011010100)

Division:

12 (1100) / 5 (0101) = 2 (0010)

Authors

About

Implementation of a complete desk calculator with Qiskit

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published