Qiskit / README.md
samyak152002's picture
Update README.md
23e87a4
|
raw
history blame
3.25 kB
# Quantum Multiplication App
## Overview
The Quantum Multiplication App is a simple web application developed using Streamlit that allows users to perform binary multiplication using a quantum algorithm implemented with IBM's Qiskit framework. This application demonstrates the power of quantum computing in solving computational problems.
## Features
- Binary multiplication using quantum circuitry.
- Input two binary numbers (multiplicand and multiplier) and obtain the quantum multiplication result.
- User-friendly web interface.
## Requirements
Before running this app, ensure that you have the following dependencies installed:
- Python 3.x
- Qiskit
- Streamlit
## How it Works
The Quantum Multiplication App uses the following steps to perform binary multiplication using a quantum circuit:
### Input Preparation:
Users input two binary numbers: the multiplicand and the multiplier. These binary numbers are represented as strings, e.g., "1101" and "101."
Quantum Registers:
The program starts by creating quantum registers to represent the multiplicand, multiplier, and an accumulator (for the result). It also creates classical registers for measurement outcomes.
Encoding Input:
Before performing quantum operations, the program encodes the binary input numbers into the quantum registers.
If a bit in the binary input is '1,' an X gate is applied to flip the corresponding qubit.
Quantum Circuit Operations:
The program enters a loop where it performs quantum operations similar to the Fourier Transform and inverse Fourier Transform (also known as the Inverse Quantum Fourier Transform). However, it's important to note that these quantum operations are approximations of the classical Fourier Transform.
It starts by adding the encoded multiplicand and multiplier to the accumulator in a way that resembles classical multiplication.
These operations are done iteratively while the multiplier is greater than zero. After each iteration, measurement is performed on the multiplier to check if it has reached zero.
The results of the measurements are used to determine when to exit the loop.
Measurement and Result:
After the loop is complete, measurement is performed on the accumulator to obtain the result of the quantum multiplication.
The measurement outcomes are collected and displayed to the user.
Visualization:
The Streamlit framework is used to create a user-friendly web interface where users can input binary numbers and trigger the quantum multiplication process.
The result of the quantum multiplication is displayed on the web interface for the user to see.
Quantum Computing Concepts
This app showcases the following quantum computing concepts:
Quantum Registers
Quantum Circuitry
Quantum Superposition
Quantum Phase Estimation
Limitations
This app is designed for educational purposes and may not be suitable for large binary numbers.
It uses a quantum simulator (Qiskit's Aer backend) and may not demonstrate the full potential of quantum hardware.
About the Author
This app was created by samyak152002.
Acknowledgments
Qiskit - An open-source quantum computing framework.
Streamlit - A Python library for creating web apps.
License
This app is open-source and available under the MIT License.