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
-
to install the dependencies run
poetry install
-
start the service with
poetry run flask run
-
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" }
-
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" }
POST /api/v1/bloqcat/winery/topology/deploy/json- Accepts a JSON topology (node and relationship templates), validates it, and returns a
.qasmfile. - Request body:
{ "nodeTemplates": [...], "relationshipTemplates": [...] } - Response:
.qasmfile with aggregated content. - Typical use: Deployment of a quantum pattern topology into a runnable solution.
- Accepts a JSON topology (node and relationship templates), validates it, and returns a
- Swagger UI : http://localhost:5000/api/swagger-ui – Explore and test API endpoints interactively.
- RapiDoc : http://localhost:5000/api/rapidoc – Alternative interface for API exploration.
Note: Replace
localhost:5000with your actual host and port if deploying elsewhere.
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.
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.
The initial code contribution has been supported by the project SeQuenC.