Metadata-Version: 2.1
Name: qadence-protocols
Version: 0.1.3
Summary: Protocols interface for running experiments using Qadence.
Author-email: Mario Dagrada <mario.dagrada@pasqal.com>, Roland Guichard <roland.guichard@pasqal.com>, Raja Selvarajan <raja.selvarajan@pasqal.com>, Gergana Velikova <gergana.velikova@pasqal.com>
License: Apache 2.0
License-File: LICENSE
Keywords: quantum
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: <3.12,>=3.9
Requires-Dist: qadence[braket,horqrux,pulser]==1.2.7
Requires-Dist: qutip==4.7.2
Requires-Dist: torch
Description-Content-Type: text/markdown

# Qadence-Protocols

**Qadence-Protocols** is a Python package that provides extra functionality for Qadence.

[![Linting](https://github.com/pasqal-io/qadence-protocols/actions/workflows/lint.yml/badge.svg)](https://github.com/pasqal-io/qadence-protocols/actions/workflows/lint.yml)
[![Tests](https://github.com/pasqal-io/qadence-protocols/actions/workflows/test_fast.yml/badge.svg)](https://github.com/pasqal-io/qadence-protocols/actions/workflows/test.yml)
[![Documentation](https://github.com/pasqal-io/qadence-protocols/actions/workflows/build_docs.yml/badge.svg)](https://pasqal-io.github.io/qadence-protocols/latest)
<!-- [![Pypi](https://badge.fury.io/py/qadence-protocols.svg)](https://pypi.org/project/qadence-protocols/) -->
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Feature highlights

* A [block-based system](docs/tutorials/getting_started.md) for composing _**complex digital-analog
  programs**_ in a flexible and scalable manner, inspired by the Julia quantum SDK
  [Yao.jl](https://github.com/QuantumBFS/Yao.jl) and functional programming concepts.

* A [simple interface](docs/digital_analog_qc/analog-basics.md) to work with _**interacting neutral-atom qubit systems**_
  using [arbitrary registers topologies](docs/tutorials/register.md).

* An intuitive [expression-based system](docs/tutorials/parameters.md) developed on top of the symbolic library [Sympy](https://www.sympy.org/en/index.html) to construct _**parametric quantum programs**_ easily.

* [High-order generalized parameter shift rules](docs/advanced_tutorials/differentiability.md) for _**differentiating parametrized quantum operations**_.

* Out-of-the-box _**automatic differentiability**_ of quantum programs with [PyTorch](https://pytorch.org/) integration.

* _**Efficient execution**_ on a variety of different purpose backends: from state vector simulators to tensor network emulators and real devices.

## Installation guide

Qadence-Protocols will soon be available on PyPI.
<!-- [PyPI](https://pypi.org/project/qadence-protocols/) and can be installed using `pip` as follows: -->

```bash
pip install qadence_protocols
```

<!-- The default, pre-installed backend for Qadence is [PyQTorch](https://github.com/pasqal-io/pyqtorch), a differentiable state vector simulator for digital-analog simulation based on `PyTorch`. It is possible to install additional, `PyTorch` -based backends and the circuit visualization library using the following extras: -->

<!-- * `pulser`: The [Pulser](https://github.com/pasqal-io/Pulser) backend for composing, simulating and executing pulse sequences for neutral-atom quantum devices. -->
<!-- * `braket`: The [Braket](https://github.com/amazon-braket/amazon-braket-sdk-python) backend, an open source library that provides a framework for interacting with quantum computing hardware devices through Amazon Braket. -->
<!-- * `visualization`: A visualization library to display quantum circuit diagrams. -->

<!-- Qadence also supports a `JAX` engine which is currently supporting the [Horqrux](https://github.com/pasqal-io/horqrux) backend. `horqrux` is currently only available via the [low-level API](examples/backends/low_level/horqrux_backend.py). -->


<!-- To install individual extras, use the following syntax (**IMPORTANT** Make sure to use quotes): -->

<!-- ```bash -->
<!-- pip install "qadence[braket,pulser,visualization]" -->
<!-- ``` -->

<!-- To install all available extras, simply do: -->

<!-- ```bash -->
<!-- pip install "qadence[all]" -->
<!-- ``` -->

<!-- **IMPORTANT** -->
<!-- Before installing `qadence` with the `visualization` extra, make sure to install the `graphviz` package -->
<!-- on your system: -->

<!-- ```bash -->
<!-- # For Debian-based distributions (e.g. Debian, Ubuntu) -->
<!-- sudo apt install graphviz -->

<!-- # on MacOS -->
<!-- brew install graphviz -->

<!-- # via conda -->
<!-- conda install python-graphviz -->
<!-- ``` -->

## Contributing

Before making a contribution, please review our [code of conduct](docs/CODE_OF_CONDUCT.md).

- **Submitting Issues:** To submit bug reports or feature requests, please use our [issue tracker](https://github.com/pasqal-io/qadence-protocols/issues).
- **Developing in qadence:** To learn more about how to develop within `qadence`, please refer to [contributing guidelines](docs/CONTRIBUTING.md).

### Setting up qadence in development mode

We recommend to use the [`hatch`](https://hatch.pypa.io/latest/) environment manager to install `qadence_protocols` from source:

```bash
python -m pip install hatch

# get into a shell with all the dependencies
python -m hatch shell

# run a command within the virtual environment with all the dependencies
python -m hatch run python my_script.py
```

**WARNING**
`hatch` will not combine nicely with other environment managers such as Conda. If you still want to use Conda,
install it from source using `pip`:

```bash
# within the Conda environment
python -m pip install -e .
```

## Citation

If you use Qadence-Protocols for a publication, we kindly ask you to cite our work using the following BibTex entry:

```latex
@misc{qadence2023pasqal,
  url = {https://github.com/pasqal-io/qadence},
  title = {Qadence: {A} {D}igital-analog quantum programming interface.},
  year = {2023}
}
```

## License
Qadence-Protocols is a free and open source software package, released under the Apache License, Version 2.0.
