Metadata-Version: 2.4
Name: qciconnect-miniserver
Version: 0.3.0
Summary: Mini server for local development
Keywords: quantum computing,QCi Connect SDK,mini server
Author: DLR-SC, David da Costa, Thomas Keitzl, Elisabeth Lobe, Johannes Renkl, Gary Schmiedinghoff, Thomas Stehle, Lukas Windgätter
Author-email: DLR-SC <qc-software@dlr.de>
License-Expression: Apache-2.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Requires-Dist: qciconnect-common
Requires-Dist: fastapi==0.110.3
Requires-Dist: flower==2.0.1
Requires-Dist: uvicorn>=0.29.0,<1
Requires-Dist: docker>=7.1.0,<8
Requires-Dist: pyyaml>=6.0.2,<7
Requires-Dist: pydantic-settings>=2.4.0
Requires-Dist: grpcio>=1.76.0
Requires-Dist: grpcio-tools>=1.74.0
Requires-Dist: platformdirs>=4.9.2
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# QCI Connect Miniserver

This is a python package to locally execute the compilers and simulators of the DLR's QCI Connect platform. 
It also allows 
(a) to locally develop algorithms with the goal to integrate them to the platform, 
(b) to prototype quickly, and 
(c) to run algorithms on the local computer using the same interface as with QCI Connect API Client.

## Checkout Workspace

Once the workspace is cloned, the full functionality of the local compiler base can be initialised as:
```
git submodule update --init
```

## Quick start for develop mode

The following steps provide a quick start guide for programmatically interacting with the local development environment.

First, verify that Docker (including the Docker Compose plugin) is installed, then build the compiler step images as follows:

```bash
cd deployment/docker-dev
cat <token-file> | docker login -u <USER> --password-stdin registry.hzdr.de
docker compose build --no-cache
```

Next, you’re ready to start the `miniserver`:

```bash
uv sync
source .venv/bin/activate
miniserver
```
To build the wheel and/or the source distribution (tar.gz), run:

```bash
uv build
```

## Troubleshooting

### Miniserver

In case you need to restart the `miniserver` just stop it through `CTR+C` or

```bash
miniserver stop
```
It could be that `miniserver` does not restart properly due to `compiler-containers` still running from previous sections
```bash
docker rm -v -f <compiler-container-list>
```
