Skip to main content

No project description provided

Project description

Qamomile

PyPI version License

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/

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[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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qamomile-0.5.1.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qamomile-0.5.1-py3-none-any.whl (54.5 kB view details)

Uploaded Python 3

File details

Details for the file qamomile-0.5.1.tar.gz.

File metadata

  • Download URL: qamomile-0.5.1.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1017-azure

File hashes

Hashes for qamomile-0.5.1.tar.gz
Algorithm Hash digest
SHA256 5358bceb4b8490c0b7365690ca7c721e9637dc6f3d097fe4f6e9498be7ffc72b
MD5 e98883c863e71d8c2429d52791dcb1a9
BLAKE2b-256 097fac717c5592ff80921a22a5e907a1775327d4852c2885f04c6b44bb8502c8

See more details on using hashes here.

File details

Details for the file qamomile-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: qamomile-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 54.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1017-azure

File hashes

Hashes for qamomile-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5eba32e578d3921d780ca11ce488752599aec26ac13bb1f9cd3528019a72188f
MD5 46953a65b182bf8ae233f59afbc8fb25
BLAKE2b-256 f7daa033f47c9e92606fc8f7d3aaded61a5efca0e6b725ecf945729016dcfb45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page