This project integrates a GPT-3.5-based chatbot with quantum computing capabilities. Utilizing OpenAI’s GPT-3.5-turbo for generating responses and IBM's quantum backend for quantum computations, this project combines natural language processing with cutting-edge quantum technology.
- GPT-3.5 Chatbot: Leverages OpenAI's GPT-3.5-turbo to generate intelligent responses.
- Quantum Computation: Executes a quantum circuit on IBM's quantum hardware and returns quantum state probabilities.
- Gradio Interface: Provides a user-friendly web interface for interacting with the chatbot.
- Python 3.6 or later
- IBM Quantum Experience account with an API token
-
Clone the repository:
git clone https://github.com/yourusername/quantum-chatbot.git cd quantum-chatbot
-
Set up a virtual environment (recommended):
python -m venv env source env/bin/activate # On Windows, use `env\Scripts\activate`
-
Install the required Python packages:
Create a
requirements.txt
file with the following content:gradio qiskit qiskit_ibm_runtime g4f
-
Configuration
Update IBM Quantum API Token:
Replace the placeholder token in
app.py
with your actual IBM Quantum API token:token="YOUR_IBMQ_TOKEN_HERE"
-
Usage
Run the application:
Start the Gradio interface by executing:
python app.py
User Input:
What is the current state of quantum computation?
[GPT-3.5 response to the user query]
Quantum Result: [Quantum computation result]