Quantum Calculator for understanding variables and outcomes
Quanta is a Python-based Quantum Calculator with a graphical user interface (GUI) built using Tkinter. It enables users to perform various quantum computations, including observing qubits, calculating error rates, applying quantum gates, calculating spin, and running Grover's algorithm. Useful for building programs that require understanding gates, states and different aspects of running qubits for software or hardware quantum systems.
- Observe Qubits: Measure a specified number of qubits and view the results.
- Calculate Error Rates: Determine the error rate based on qubit measurements.
- Apply Quantum Gates: Apply various quantum gates (RX, RY, RZ, H, X) to selected qubits.
- Calculate Spin: Compute the spin of a qubit based on its state.
- Grover's Algorithm: Run Grover's algorithm to analyze quantum search speed.
- Real-time Logs: Monitor application logs within the GUI and access detailed logs in the
quantum_verse_calculator.log
file.
- Python 3.11: Ensure you have Python 3.11 installed. You can download it from the official website.
- pip: Python's package installer should be available with your Python installation.
git clone https://github.com/R-D-BioTech-Alaska/Quanta.git
cd Quanta
Quanta relies on several Python packages. It's recommended to use a virtual environment to manage dependencies.
-
Create a Virtual Environment
python3.11 -m venv venv
-
Activate the Virtual Environment
-
Windows:
venv\Scripts\activate
-
macOS/Linux:
source venv/bin/activate
-
-
Install Required Packages
pip install -r requirements.txt
If
requirements.txt
is not provided, install the necessary packages manually:pip install qiskit qiskit-aer
Tkinter is included with standard Python installations. If it's missing, refer to your operating system's instructions to install it.
Run the Quanta application using the following command:
python Quanta.py
-
Observe Qubits
- Number of Qubits: Specify how many qubits you want to observe.
- Shots: Define the number of measurement shots.
- Observe Button: Execute the observation and view results in the output section.
-
Error Rates
- Number of Qubits: Specify the qubits involved.
- Shots: Define the number of measurement shots.
- Calculate Error Rate Button: Compute and display the error rate.
-
Gate Variables
- Gate Type: Select the type of quantum gate to apply (RX, RY, RZ, H, X).
- Angle: Specify the angle for rotation gates (RX, RY, RZ).
- Qubit Index: Choose the qubit to which the gate will be applied.
- Apply Gate Button: Execute the gate application and view the state vector and measurement results.
-
Calculate Spin
- Qubit State: Select the state of the qubit (0 or 1).
- Calculate Spin Button: Compute and display the spin based on the qubit state.
-
Grover's Speed
- Target State (binary): Input the target state in binary.
- Number of Qubits: Specify the number of qubits for Grover's algorithm.
- Run Grover's Algorithm Button: Execute the algorithm and view the speed.
-
Settings
- Font Size: Adjust the font size for better readability.
- Theme: Switch between Dark and Light themes to suit your preference.
- Apply Settings Button: Apply the selected settings immediately.
Monitor real-time logs within the application under the Logs section. Detailed logs are also saved in the quantum_verse_calculator.log
file located in the project's root directory.
Customize your Quanta experience through the Settings tab:
- Font Size: Use the spinbox to select your desired font size (ranging from 8 to 20).
- Theme: Choose between Dark and Light themes to enhance visibility and reduce eye strain.
- Apply Settings: Click the button to apply your chosen settings instantly.
Contributions are welcome! To contribute to Quanta, please follow these steps:
-
Fork the Repository
Click the "Fork" button at the top right of the repository page.
-
Create a New Branch
git checkout -b feature/YourFeatureName
-
Commit Your Changes
git commit -m "Add feature: YourFeatureName"
-
Push to the Branch
git push origin feature/YourFeatureName
-
Create a Pull Request
Navigate to the original repository and click "Compare & pull request." Provide a clear description of your changes and submit the pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- GitHub: @R-D-BioTech-Alaska
- Website: R&D BioTech Alaska