Quantum VQE Package
The Quantum VQE (Variational Quantum Eigensolver) package is a Python library for simulating the VQE algorithm on quantum computers. It utilizes the Qiskit framework to create and optimize quantum circuits that estimate the ground state energy of a given Hamiltonian.
Features
- Implementation of the VQE algorithm using Qiskit.
- Functions to create variational ansatzes for quantum circuits.
- Optimization routines to find the minimum eigenvalue of the Hamiltonian.
- Utilities for validating input Hamiltonians.
Installation
Before installing the Quantum VQE package, ensure that you have Python 3.7 or higher and pip installed.
To install the Quantum VQE package, run the following command in your terminal:
pip install git+https://github.com/SweatyCrayfish/quantum_vqe.git
Alternatively, you can clone the repository and install the package locally:
git clone https://github.com/SweatyCrayfish/quantum_vqe.git
cd quantum_vqe
pip install .
Usage
Here is a simple example of how to use the Quantum VQE package to find the ground state energy of a Hamiltonian:
from qiskit.opflow import X, Z, I
from quantum_vqe.vqe import create_vqe_ansatz, optimize_vqe
from qiskit import Aer
Define your Hamiltonian. For example, for a simple 2-qubit system:
hamiltonian = (X ^ X) + (Z ^ I)
Define the quantum backend
backend = Aer.get_backend('statevector_simulator')
circuit, parameters = create_vqe_ansatz(num_qubits=2)
Optimize the circuit parameters
result = optimize_vqe(circuit, hamiltonian, backend)
print(f"Ground state energy: {result.fun}")
For more detailed examples, please refer to the examples/ directory in the repository.
Development
To contribute to the Quantum VQE package, you can clone the repository and set up a development environment:
git clone https://github.com/SweatyCrayfish/quantum_vqe.git
cd quantum_vqe
pip install -e .
Testing
To run the tests for the Quantum VQE package, navigate to the package root and execute:
python -m unittest discover tests
License
This project is licensed under the MIT License - see the LICENSE file for details.
Authors
- Viktor Veselov - Initial work
Acknowledgments
- The Qiskit community for providing the framework to build upon.
Citation
If you use this package in your research, please cite it as follows:
@misc{quantum_vqe, author = {Viktor Veselov}, title = {Quantum VQE: A Variational Quantum Eigensolver Package}, year = {2023}, publisher = {GitHub}, journal = {GitHub repository}, howpublished = {url{https://github.com/SweatyCrayfish/quantum_vqe}} }
Metadata
Release files for quantum-vqe 0.1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quantum_vqe-0.1.2.1.tar.gz | 4.5 kB | Without provenance | Details for quantum_vqe-0.1.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantum_vqe-0.1.2.1-py3-none-any.whl | Python 3 | none | any | Details for quantum_vqe-0.1.2.1-py3-none-any.whl |
Total release size: 10.1 kB
Release files / quantum_vqe-0.1.2.1.tar.gz
| Download URL | quantum_vqe-0.1.2.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4014eb863ee41b9fa0ccae433039e50877f6ea483a7ecf38658c7fc087b256b4
|
|
BLAKE2b-256 checksum How to use checksums |
aa3d7ec99f7daa7c41639ee59ca5168530a010f5e84ac3790a72fd3fdad2bc57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / quantum_vqe-0.1.2.1-py3-none-any.whl
| Download URL | quantum_vqe-0.1.2.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6a851ccc774400cf461bf9aee6e5ea4a5d13eadb7df9eb501c861e971c848da
|
|
BLAKE2b-256 checksum How to use checksums |
5e8e302a56085afc788145888a79661a83c4429e3b8858271a9c313844c6d045
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for quantum-vqe 0.1.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.