# python-quanfluence-sdk
Quanfluence Developer Kit for Python
<div>
π <a href="#getting-started">Getting started</a> - π» <a href="#api-reference">API reference</a> - π <a href="#examples">Examples</a> - π¬ <a href="#feedback">Feedback</a>
</div>
Learn how to solve complex problems with Quanfluence using Python.
## Getting started
### Installation
You can install the Quanfluence Python SDK using the following command.
```
pip install quanfluence-sdk
```
> Requires Python 3.0 or higher.
# Usage
## Initialize QuanfluenceClient
Once the package is installed, you can import the library using import or require approach.
```python
from quanfluence_sdk import QuanfluenceClient
client = QuanfluenceClient()
```
## Perform Authentication
Quanfluence APIs are access contolled, you need valid user crendentials to invoke any module methods. Use below method for authentication.
```python
try:
login = client.signin(USERNAME, PASSWORD)
except Error:
print(Error)
```
> You can use valid quanfluence client's USERNAME & PASSWORD
## API references
Quanfluence comprises various ising devices to execute complex problems. Use below methods to interact with Quanfluence APIs.
### Device Management
#### Create a Device
```python
from quanfluence_sdk import QuanfluenceClient
device = Device(...)
response = client.create_device(device)
```
> Use Device model with required attributes
#### Update a Device
```python
from quanfluence_sdk import QuanfluenceClient
device = Device(...)
response = client.update_device(device)
```
> Use Form model with id or uuid & other required attributes
#### Get a Device
```python
from quanfluence_sdk import QuanfluenceClient
response: Device = QuanfluenceClient.get(ID)
```
> ID is unique device identifier
#### Upload a Qubo file to Device
```python
from quanfluence_sdk import QuanfluenceClient
response = QuanfluenceClient.upload_device_qubo(ID, FILE_PATH)
```
> ID is unique device identifier
> FILE_PATH is qubo file path
### Device Execution
#### Execute Device with QUBO as input
```python
from quanfluence_sdk import QuanfluenceClient
Q = {(0, 0): 1, (0,1): -1, (1,1): 2}
response = client.execute_device_qubo_input(ID, Q)
```
> ID is unique device identifier
#### Execute Device with QUBO as file
```python
from quanfluence_sdk import QuanfluenceClient
response = client.execute_device_qubo_file(ID, FILE_NAME)
```
> ID is unique submission identifier
> FILE_NAME is unique file identifier created using Upload a Qubo file to Device
## Examples
- [Examples](https://github.com/quanfluence/python-quanfluence-sdk/blob/main/EXAMPLES.md) - explore our examples docs and learn more about using sdk.
### Feedback
---
If you get stuck, weβre here to help. The following are the best ways to get assistance working through your issue:
Use our [GitHub Issue Tracker][gh-issues] for reporting bugs or requesting features.
Visit the [Quanfluence Community][quanfluence-community] for getting help using Quanfluence Developer Kit for Python or just generally bond with your fellow Quanfluence developers.
<!-- Markdown links -->
Raw data
{
"_id": null,
"home_page": "https://github.com/quanfluence/python-quanfluence-sdk",
"name": "quanfluence-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6.0",
"maintainer_email": null,
"keywords": "quanfluence, quanfluence-api, web-api, sdk, rest-api-client",
"author": "Quanfluence SDK",
"author_email": "sdk@quanfluence.com",
"download_url": "https://files.pythonhosted.org/packages/f8/ba/13e7c86932140d85e8b017bdc3a21fbaee8173d991e0c3aa6f0ab0dce26f/quanfluence_sdk-0.0.1.tar.gz",
"platform": null,
"description": "# python-quanfluence-sdk\nQuanfluence Developer Kit for Python\n\n<div>\n\ud83d\ude80 <a href=\"#getting-started\">Getting started</a> - \ud83d\udcbb <a href=\"#api-reference\">API reference</a> - \ud83d\udcda <a href=\"#examples\">Examples</a> - \ud83d\udcac <a href=\"#feedback\">Feedback</a>\n</div>\n\n\nLearn how to solve complex problems with Quanfluence using Python.\n\n## Getting started\n### Installation\nYou can install the Quanfluence Python SDK using the following command.\n```\npip install quanfluence-sdk\n```\n\n> Requires Python 3.0 or higher.\n\n# Usage\n## Initialize QuanfluenceClient\n\nOnce the package is installed, you can import the library using import or require approach.\n\n```python\nfrom quanfluence_sdk import QuanfluenceClient\n\nclient = QuanfluenceClient()\n\n```\n\n## Perform Authentication\n\nQuanfluence APIs are access contolled, you need valid user crendentials to invoke any module methods. Use below method for authentication.\n\n```python\ntry:\n login = client.signin(USERNAME, PASSWORD)\nexcept Error:\n print(Error)\n```\n> You can use valid quanfluence client's USERNAME & PASSWORD\n\n## API references\nQuanfluence comprises various ising devices to execute complex problems. Use below methods to interact with Quanfluence APIs.\n\n### Device Management\n#### Create a Device\n```python\nfrom quanfluence_sdk import QuanfluenceClient\n\ndevice = Device(...)\nresponse = client.create_device(device)\n```\n> Use Device model with required attributes\n\n#### Update a Device\n```python\nfrom quanfluence_sdk import QuanfluenceClient\n\ndevice = Device(...)\nresponse = client.update_device(device)\n```\n> Use Form model with id or uuid & other required attributes\n\n#### Get a Device\n```python\nfrom quanfluence_sdk import QuanfluenceClient\n\nresponse: Device = QuanfluenceClient.get(ID)\n```\n> ID is unique device identifier\n\n#### Upload a Qubo file to Device\n```python\nfrom quanfluence_sdk import QuanfluenceClient\n\nresponse = QuanfluenceClient.upload_device_qubo(ID, FILE_PATH)\n```\n> ID is unique device identifier\n> FILE_PATH is qubo file path\n\n\n### Device Execution\n#### Execute Device with QUBO as input\n```python\nfrom quanfluence_sdk import QuanfluenceClient\n\nQ = {(0, 0): 1, (0,1): -1, (1,1): 2}\nresponse = client.execute_device_qubo_input(ID, Q)\n```\n> ID is unique device identifier\n\n#### Execute Device with QUBO as file\n```python\nfrom quanfluence_sdk import QuanfluenceClient\n\nresponse = client.execute_device_qubo_file(ID, FILE_NAME)\n```\n> ID is unique submission identifier\n> FILE_NAME is unique file identifier created using Upload a Qubo file to Device\n\n\n## Examples\n- [Examples](https://github.com/quanfluence/python-quanfluence-sdk/blob/main/EXAMPLES.md) - explore our examples docs and learn more about using sdk.\n\n\n### Feedback\n\n---\n\nIf you get stuck, we\u2019re here to help. The following are the best ways to get assistance working through your issue:\n\nUse our [GitHub Issue Tracker][gh-issues] for reporting bugs or requesting features.\nVisit the [Quanfluence Community][quanfluence-community] for getting help using Quanfluence Developer Kit for Python or just generally bond with your fellow Quanfluence developers.\n\n<!-- Markdown links -->\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Quanfluence Developer Kit for Python",
"version": "0.0.1",
"project_urls": {
"Download": "https://github.com/quanfluence/python-quanfluence-sdk/archive/v_01.tar.gz",
"Homepage": "https://github.com/quanfluence/python-quanfluence-sdk"
},
"split_keywords": [
"quanfluence",
" quanfluence-api",
" web-api",
" sdk",
" rest-api-client"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b20862e9e5725dd73c586bb8a9b30d9fe842532ebac7bf8ce25c8a3386de6c93",
"md5": "47ae64fb515bed370bf8ed462581b35a",
"sha256": "c0dfaf6acec839a29581e4bfe0b0958e8e445edd873a498577f4e4588bf7f523"
},
"downloads": -1,
"filename": "quanfluence_sdk-0.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "47ae64fb515bed370bf8ed462581b35a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6.0",
"size": 5639,
"upload_time": "2025-02-05T19:44:00",
"upload_time_iso_8601": "2025-02-05T19:44:00.447550Z",
"url": "https://files.pythonhosted.org/packages/b2/08/62e9e5725dd73c586bb8a9b30d9fe842532ebac7bf8ce25c8a3386de6c93/quanfluence_sdk-0.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f8ba13e7c86932140d85e8b017bdc3a21fbaee8173d991e0c3aa6f0ab0dce26f",
"md5": "bc241bafbded7a649c1da016b1e2d2e3",
"sha256": "2b48f53f2d098cb0777a712352fb7fbeee6d7506e6a50d9a6e20df0c6349fbb2"
},
"downloads": -1,
"filename": "quanfluence_sdk-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "bc241bafbded7a649c1da016b1e2d2e3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.0",
"size": 5235,
"upload_time": "2025-02-05T19:44:02",
"upload_time_iso_8601": "2025-02-05T19:44:02.440160Z",
"url": "https://files.pythonhosted.org/packages/f8/ba/13e7c86932140d85e8b017bdc3a21fbaee8173d991e0c3aa6f0ab0dce26f/quanfluence_sdk-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-05 19:44:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "quanfluence",
"github_project": "python-quanfluence-sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "quanfluence-sdk"
}