No project description provided
Project description
Qamomile
Qamomile is a powerful SDK designed for quantum optimization algorithms, specializing in the conversion of mathematical models into quantum circuits. It serves as a bridge between classical optimization problems and quantum computing solutions.
Documentation: https://jij-inc.github.io/Qamomile/
LP: https://jij-inc.github.io/Qamomile/landing.html
Features
- Versatile Compatibility: Supports leading quantum circuit SDKs including Qiskit and QuriParts.
- Advanced Algorithm Support: Implements sophisticated encoding and algorithms like QAOA and QRAO.
- Flexible Model Conversion: Utilizes JijModeling for describing mathematical models and converting them to various quantum circuit SDKs.
- Intermediate Representation: Capable of representing both Hamiltonians and quantum circuits as intermediate forms.
- Standalone Functionality: Can implement quantum circuits independently, similar to other quantum circuit SDKs.
Installation
To install Qamomile, use pip:
pip install qamomile
For optional dependencies:
pip install "qamomile[qiskit]" # For Qiskit integration
pip install "qamomile[quri-parts]" # For QuriParts integration
pip install "qamomile[pennylane]" # For QuriParts integration
pip install "qamomile[qutip]" # For QuTiP integration
Quick Start
Here's a simple example of how to use Qamomile with QAOA:
import jijmodeling as jm
import jijmodeling_transpiler.core as jmt
from qamomile.core.converters.qaoa import QAOAConverter
from qamomile.qiskit.transpiler import QiskitTranspiler
# Define QUBO problem
Q = jm.Placeholder("Q", ndim=2)
n = Q.len_at(0, latex="n")
x = jm.BinaryVar("x", shape=(n,))
problem = jm.Problem("qubo")
i, j = jm.Element("i", n), jm.Element("j", n)
problem += jm.sum([i, j], Q[i, j] * x[i] * x[j])
# Prepare instance data
instance_data = {"Q": [[0.1, 0.2, -0.1], [0.2, 0.3, 0.4], [-0.1, 0.4, 0.0]]}
# Compile the problem
compiled_instance = jmt.compile_model(problem, instance_data)
# Create QAOA converter
qaoa_converter = QAOAConverter(compiled_instance)
# Create Qiskit transpiler
qiskit_transpiler = QiskitTranspiler()
# Get QAOA circuit
p = 2 # Number of QAOA layers
qaoa_circuit = qaoa_converter.get_qaoa_ansatz(p)
# Convert to Qiskit circuit
qiskit_circuit = qiskit_transpiler.transpile_circuit(qaoa_circuit)
# ... (continue with quantum execution and result processing)
Documentation
For more detailed information, please refer to our documentation.
Contributing
We welcome contributions! Please see our Contributing Guide for more details.
License
Qamomile is released under the Apache 2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qamomile-0.6.0.tar.gz.
File metadata
- Download URL: qamomile-0.6.0.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f98ac279b865d7bedf80d08a6e748004d5507637fe5e8a191d7ebc4748416e5
|
|
| MD5 |
92aa1439bd15aa176f665ca6f7c580c4
|
|
| BLAKE2b-256 |
4b953f8fd07a465fb099bc9500d47c95f8d0c9ceb20d5fd5afccb27e9587da9f
|
File details
Details for the file qamomile-0.6.0-py3-none-any.whl.
File metadata
- Download URL: qamomile-0.6.0-py3-none-any.whl
- Upload date:
- Size: 59.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eb2537c188e47e41c15a92e2bf57f3546dd2bbe4171e0da88ce593c3051e6ff
|
|
| MD5 |
6f837feaeb04682353a8a9f779ac8cdb
|
|
| BLAKE2b-256 |
430fc7bf66d2a894a6f3c8bcd98c1ed48c28d69b0f1ac2d0c755f612f2527c90
|