An SDK for CIM or QUBO.
Project description
Kaiwu Community
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
- Kaiwu SDK Help Center - View detailed documentation and learn QUBO modeling and solving
- Example Code - Browse complete code examples
Getting Help
- Developer Community - Participate in community activities and connect with other developers
- GitHub Issues - Submit issues or feature requests
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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
476e8e96bd6747f6987ee7083643e63355e2c4ee09d5899f9fb1522578f87101
|
|
| MD5 |
7b8a398e09da046d214648866e3b5fec
|
|
| BLAKE2b-256 |
958f2d0ef98875bfb31e2bfd99f5d563b52c924757680744a5deb75929594bb2
|
Provenance
The following attestation bundles were made for kaiwu_community-1.0.3.tar.gz:
Publisher:
release.yml on qboson/kaiwu_community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kaiwu_community-1.0.3.tar.gz -
Subject digest:
476e8e96bd6747f6987ee7083643e63355e2c4ee09d5899f9fb1522578f87101 - Sigstore transparency entry: 772084852
- Sigstore integration time:
-
Permalink:
qboson/kaiwu_community@f2724163dc2f0ae66d96a04ab6c5abbe04f5fc99 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/qboson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f2724163dc2f0ae66d96a04ab6c5abbe04f5fc99 -
Trigger Event:
push
-
Statement type:
File details
Details for the file kaiwu_community-1.0.3-py3-none-any.whl.
File metadata
- Download URL: kaiwu_community-1.0.3-py3-none-any.whl
- Upload date:
- Size: 42.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2452b3b2df8f9b4ae9f57c13d58526fe5c7c87d1249fecc0792f8e6764035efd
|
|
| MD5 |
89816afa4b46291d4f061fea2a542cf9
|
|
| BLAKE2b-256 |
f4d723f2548330c3398c656c88217cc12560a975385f9667624d85ca2d2cf9a7
|
Provenance
The following attestation bundles were made for kaiwu_community-1.0.3-py3-none-any.whl:
Publisher:
release.yml on qboson/kaiwu_community
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kaiwu_community-1.0.3-py3-none-any.whl -
Subject digest:
2452b3b2df8f9b4ae9f57c13d58526fe5c7c87d1249fecc0792f8e6764035efd - Sigstore transparency entry: 772084856
- Sigstore integration time:
-
Permalink:
qboson/kaiwu_community@f2724163dc2f0ae66d96a04ab6c5abbe04f5fc99 -
Branch / Tag:
refs/tags/v1.0.3 - Owner: https://github.com/qboson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f2724163dc2f0ae66d96a04ab6c5abbe04f5fc99 -
Trigger Event:
push
-
Statement type: