Skip to content

LEQO-Framework/leqo-backend

Repository files navigation

LEQO Back-End

Docker image on ghcr.io Documentation

The backend for the LEQO-Framework - a low-code platform for developing quantum algorithms.

🔧 Features

  • Provide a REST-API for the LEQO frontend
  • Retrieve OpenQASM implementations for low-code nodes
  • Merge low-code models into a single OpenQASM program compatible with Qiskit
  • Support OpenQASM 2 input via an internal converter
  • Optimize circuits by reusing ancilla qubits automatically
  • Can handle nested low-code nodes: If-Then-Else and Repeat
  • Build to be extensible

The project uses:

  • uv as the Python package manager
  • mypy for static type checking
  • ruff for code formatting and linting

🚀 Quick Start

Make sure Docker and Docker Compose are installed.

Run the following commands:

cp .env.template .env
docker compose -f compose-dev.yaml up --build

Once started, access the backend at:

Alternative: Local setup

Install uv – see getting started with uv

Run:

  uv sync --all-groups --all-extras
  cp .env.template .env
  nano .env # update POSTGRES_HOST to your needs (try POSTGRES_HOST=localhost)
  docker compose up postgres -d
  uv run fastapi run app/main.py --port 8000

Open localhost:8000 <http://localhost:8000/redoc> to verify the backend is running

📚 Documentation

Build the docs locally via:

uv run --no-sync extract-openapi.py
uv run cyclonedx-py venv -o docs/_static/sbom.json
uv run sphinx-autobuild --port 8080 ./docs/ ./docs/_build

For architecture, API reference, and developer guides, see our full documentation site.

📑 License

The LEQO-backend is available under the Apache 2.0 LICENSE.

⚠️ 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.

About

Backend for the Low-Code Platform

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 6

Languages