Skip to content

LEQO-Framework/bloqCat

 
 

Repository files navigation

BloQCat

This service is used for aggregating Quantumcomputing Pattern concrete solutions.


This project is based on the flask-template project. The template documentation can be found in docs/templatedocumention.md


Development

  1. to install the dependencies run

    poetry install
  2. start the service with

    poetry run flask run

REST API

🌐 Root Endpoints

  • GET /api/v1/

    • Returns available top-level API routes.
    • Response example:
      {
        "auth": "/api/v1/auth/",
        "bloqcat": "/api/v1/bloqcat/"
      }
  • GET /api/v1/auth/

    • Lists authentication-related endpoints.
    • Response example:
      {
        "login": "/api/v1/auth/login/",
        "refresh": "/api/v1/auth/refresh/",
        "whoami": "/api/v1/auth/whoami/"
      }
  • GET /api/v1/bloqcat/

    • Lists Bloqcat-specific endpoints.
    • Response example:
      {
        "deploy": "/api/v1/bloqcat/winery/topology/deploy/json"
      }

🔐 Authentication Endpoints

  • POST /api/v1/auth/login/

    • Login with credentials to receive JWT tokens.
    • Request body:
      {
        "username": "your_user",
        "password": "your_password"
      }
    • Response:
      {
        "access_token": "token",
        "refresh_token": "token"
      }
  • POST /api/v1/auth/refresh/

    • Uses a refresh token to obtain a new access token.
    • Headers: Authorization: Bearer <refresh_token>
    • Response:
      {
        "access_token": "new_access_token"
      }
  • GET /api/v1/auth/whoami/

    • Returns the currently authenticated user.
    • Headers: Authorization: Bearer <access_token>
    • Response:
      {
        "username": "your_user"
      }

⚙️ Bloqcat Endpoint

  • POST /api/v1/bloqcat/winery/topology/deploy/json
    • Accepts a JSON topology (node and relationship templates), validates it, and returns a .qasm file.
    • Request body:
      {
        "nodeTemplates": [...],
        "relationshipTemplates": [...]
      }
    • Response: .qasm file with aggregated content.
    • Typical use: Deployment of a quantum pattern topology into a runnable solution.

🌐 Interactive API Documentation

Note: Replace localhost:5000 with your actual host and port if deploying elsewhere.

Disclaimer of Warranty

Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

Haftungsausschluss

Dies ist ein Forschungsprototyp. Die Haftung für entgangenen Gewinn, Produktionsausfall, Betriebsunterbrechung, entgangene Nutzungen, Verlust von Daten und Informationen, Finanzierungsaufwendungen sowie sonstige Vermögens- und Folgeschäden ist, außer in Fällen von grober Fahrlässigkeit, Vorsatz und Personenschäden, ausgeschlossen.

Acknowledgements

The initial code contribution has been supported by the project SeQuenC.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • HTML 77.2%
  • Python 21.8%
  • Dockerfile 0.4%
  • Mako 0.2%
  • Nix 0.2%
  • Shell 0.1%
  • CSS 0.1%