Metadata-Version: 2.4
Name: qciconnect-alf
Version: 0.2.0
Summary: Application library framework of DLR QCI Connect quantum computing platform.
Keywords: quantum computing,QCI Connect SDK,application library framework,ALF
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: qciconnect-client
Requires-Dist: bitarray>=3.4.3
Requires-Dist: matplotlib>=3.10.3
Requires-Dist: networkx>=3.5
Requires-Dist: notebook>=7.4.4
Requires-Dist: qiskit>=2.1.0
Requires-Dist: qiskit-qasm3-import>=0.6.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown

[![Documentation](https://img.shields.io/badge/ALF%20Docs-0020C2)](https://alf-b49549.pages.gitlab.dlr.de/alf/)

# QCI Connect Application Library Framework (ALF)

This is a python framework for the application libraries 
of the [QCI Connect](https://connect.qci.dlr.de) platform 
of the [German Aerospace Center (DLR)](https://www.dlr.de/).

## Basic Idea

``Algorithm``s are the central objects of the ALF. 
They consume a ``ProblemInput`` and return a ``Result``. 

Internally, they describe quantum programs using ``Circuit``s. 
Circuit builder objects aid in the construction of ``Circuit``s. 

Algorithms can compute bitstrings on ``Circuit``s by submitting them to a ``Sampler``, 
which returns a ``Measurement`` object containing a histogram of the measured bitstrings. 

Algorithms can also compute ``ExpectationValue``s of ``Observable``s for a given ``Circuit`` 
in terms of their ``MeasurementBasis``.
They can create an ``EstimationJob`` that wraps the necessary information and send it to an ``Estimator``. 
Finally, the estimator internally calls its ``Sampler`` and returns an ``Estimations`` object containing the estimated ``ExpectationValue``s. 


## Installation Instructions

To install the requirements for this package, we recommend using [ultraviolet](https://docs.astral.sh/uv) ([installation guide](https://docs.astral.sh/uv/getting-started/installation/#installation-methods)).
All dependencies can be installed to a virtual environment via

``` console
git submodule update --init 
uv sync
```
Before using ALF, we need to [activate the virtual environment](https://docs.python.org/3/library/venv.html#how-venvs-work).
Here's how its done on different operating systems.
Note the [different activation instructions for other shells](https://docs.python.org/3/library/venv.html#how-venvs-work).

### Linux and MacOs
Open a bash shell and run

``` bash
source .venv/bin/activate
```

### Windows
Open the powershell and run

``` console
.venv/Scripts/activate
```

### Check if the installation was successful
You can quickly test if the installation succeeded by running the following lines in a python interpreter after activating the virtual environment

``` python
   from qciconnect.alf.base import PauliString
   pauli = PauliString({2: "X", 5:"Y"})
   print(pauli) # should return X2Y5
```
