Skip to main content

Client of the optimization framework UQO

Project description

#UQO - You, Quantum and Optimization

UQO is an optimization framework developed by the QAR-Lab of the LMU Munich.

Setup


To install UQO simply do:

   pip install uqo

To be able to connect to the UQO servers, you have to create a config object. There are two possibilities to do so:

  1. Generate private/public keys

    UQO uses elliptic curve cryptography to securely communicate with the UQO servers. Therefore you have to generate your private and public key first, before you can start using UQO. This is done as follows:

      import os
      from uqo.generate_certificates import generate_certificates
      generate_certificates(os.path.dirname(os.path.realpath(__file__)))
    

    This will generate 3 folders ("certificates", "private_keys" and "public_keys") in your current working directory. The "certificates" folder is used as a temporary directory and should be empty after the process completed. You can safely delete this folder.

  2. Create the config object directly in the code:

    ip = "SERVER_IP:SERVER_PORT"
    token = "YOUR_TOKEN"
    private_key_file = "PATH_TO_YOUR_PRIVATE_KEY_FILE"
    config = Config(method="token", credentials=token, endpoint=ip, private_key_file=private_key_file)
    

    Replace "PATH_TO_YOUR_PRIVATE_KEY_FILE" with the actual path to the clien.key_secret file you generated in step 1.

  3. Use a config file

    Create a config.json with the following structure:

    {
         "method": "token",
         "endpoint": "SERVER_IP:SERVER_PORT",
         "credentials": "YOUR_TOKEN",
         "private_key_file": "PATH_TO_YOUR_PRIVATE_KEY_FILE"
    }
    
    Replace "PATH_TO_YOUR_PRIVATE_KEY_FILE" with the actual path to the client.key_secret file you generated in step 1.
    
    
    

    You can then use this config file as follows:

    from uqo.client.config import Config
    config = Config(configpath="Path\to\the\configfile")
    

In the examples above please replace SERVER_IP and SERVER_PORT with the ip and port of the UQO server. Also replace YOUR_TOKEN with your personal UQO token.

Current State of UQO

Although UQO can already be used for a lot of tasks, it is still work in progress. You may very well run into problems where you would like to use a feature which has not yet been implemented or is not working as intended due to bugs. In this case please let me know about the exact problem or the exact feature you want to use, so I can fix / implement it.

You find my E-mail at the bottom of this ReadMe.

FAQ

Required Python Version: >= 3.7

Error messages while solving

If you try to solve a problem with UQO you might run into problems. Please consider updating ALL your python packages that are relevant for UQO. After you have done this, verify that your code is correct. If you still encounter problems, you can contact me (sebastian.zielinski@ifi.lmu.de) and I will try to help you with your problem.

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

uqo-0.0.2.6.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

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

uqo-0.0.2.6-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file uqo-0.0.2.6.tar.gz.

File metadata

  • Download URL: uqo-0.0.2.6.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for uqo-0.0.2.6.tar.gz
Algorithm Hash digest
SHA256 a753ccc63c82bcedf08aad174615227cde5dd74375354b736237acd7fa85387b
MD5 2bf80faeea7542ea1ac308279a7a992f
BLAKE2b-256 172ac388c5aaeebf9c3a0a29d498e35e1312842e00b07180c950ed42330b81bd

See more details on using hashes here.

File details

Details for the file uqo-0.0.2.6-py3-none-any.whl.

File metadata

  • Download URL: uqo-0.0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for uqo-0.0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ad5d3f189b378be64bb87b354a05f2af63c669777d8f1320b8509dc7baffb77c
MD5 10595f4b99b84db5b5655f5cd06542e5
BLAKE2b-256 291d938688cab560ffd3ef808f9f33ad04b361314318d58af779f1ced3ff0ae6

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