Skip to main content

An SDK for CIM or QUBO.

Project description

Kaiwu Community

Python Version License

Language: 中文 | English


Kaiwu Community is a Python development toolkit designed specifically for QUBO (Quadratic Unconstrained Binary Optimization) problems, providing rapid modeling, flexible extension, and efficient solving capabilities.

Installation

pip install kaiwu_community

Requirements:

  • Python 3.10.x
  • Make (for development builds)
  • Virtualenv (optional, for environment isolation)

For more installation information, please refer to the Installation Documentation.


Quick Start

Learning Resources

Getting Help

Example: Traveling Salesman Problem (TSP)

This example demonstrates how to solve the Traveling Salesman Problem using Kaiwu SDK Community, including the following steps:

  • Build a TSP problem model using a distance matrix
  • Define QUBO objective function and constraints
  • Solve the model using built-in solvers
  • Validate the solution results

For the complete TSP example code, please see example/tsp_sdk_1_2_doc_example.py.

For more detailed explanations, please refer to the TSP Documentation.


Application Scenarios

Kaiwu SDK is suitable for:

  • Combinatorial Optimization: Traveling Salesman Problem (TSP), Knapsack Problem, Graph Coloring, Max-Cut
  • Machine Learning: Feature Selection, Cluster Analysis, Model Compression
  • Quantum Computing Research: QUBO Model Research, Solver Development, Quantum Algorithm Verification

Contributing

Community contributions are welcome! 🎉

You can extend SDK functionality, such as new solver implementations, classical optimization algorithms, example programs, and documentation.

Contribution Example

Quickly extend functionality by inheriting base classes:

from kaiwu_community.core import OptimizerBase, SolverBase
import kaiwu_community

# Custom optimizer
class CustomOptimizer(OptimizerBase):
    def solve(self, ising_matrix=None):
        # Implement custom optimization logic
        pass

# Custom solver
class CustomSolver(SolverBase):
    def solve_qubo(self, model):
        # Implement custom solver logic
        self._optimizer.solve()
        pass

# Modeling
qubo_model = kaiwu_community.qubo.QuboModel()
# Calling the custom component
optimizer = CustomOptimizer()
solver = CustomSolver(optimizer)
result = solver.solve_qubo(qubo_model)

➡️ For detailed contribution guidelines, please refer to the Contributing Guide.


License

This project is open-sourced under the Apache License 2.0. For details, please see the LICENSE file.

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

kaiwu_community-1.0.3.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

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

kaiwu_community-1.0.3-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file kaiwu_community-1.0.3.tar.gz.

File metadata

  • Download URL: kaiwu_community-1.0.3.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for kaiwu_community-1.0.3.tar.gz
Algorithm Hash digest
SHA256 476e8e96bd6747f6987ee7083643e63355e2c4ee09d5899f9fb1522578f87101
MD5 7b8a398e09da046d214648866e3b5fec
BLAKE2b-256 958f2d0ef98875bfb31e2bfd99f5d563b52c924757680744a5deb75929594bb2

See more details on using hashes here.

Provenance

The following attestation bundles were made for kaiwu_community-1.0.3.tar.gz:

Publisher: release.yml on qboson/kaiwu_community

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kaiwu_community-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for kaiwu_community-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2452b3b2df8f9b4ae9f57c13d58526fe5c7c87d1249fecc0792f8e6764035efd
MD5 89816afa4b46291d4f061fea2a542cf9
BLAKE2b-256 f4d723f2548330c3398c656c88217cc12560a975385f9667624d85ca2d2cf9a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for kaiwu_community-1.0.3-py3-none-any.whl:

Publisher: release.yml on qboson/kaiwu_community

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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