Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into final_docs_review
Browse files Browse the repository at this point in the history
a-quelle committed Jan 31, 2025
2 parents 29d55a8 + c64631a commit aa40229
Showing 5 changed files with 43 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ repos:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
entry: pflake8
119 changes: 36 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,116 +4,69 @@
# Emu-MPS
</div>

**EMU-MPS** is a Pulser backend, designed to **EMU**late the dynamics of programmable arrays of neutral atoms, with matrix product states (**MPS**). It allows users to increase the number of qubits and reduce computation time.
**EMU-MPS** is a backend for the [Pulser low-level Quantum Programming toolkit](https://pulser.readthedocs.io). EMU-MPS lets you transparently run Quantum Algorithms on a simulated device, using GPU acceleration if available. More in depth, EMU-MPS is designed to **EMU**late the dynamics of programmable arrays of neutral atoms, with matrix product states (**MPS**). While benchmarking is incomplete as of this writing, early results suggest that this design makes EMU-MPS faster and more memory-efficient than previous generations of quantum emulators at running simulations with large numbers of qubits.

Join us on [Slack](https://pasqalworkspace.slack.com/archives/C07MUV5K7EU) or by [e-mail](mailto:emulation@pasqal.com) to give us feedback about how you plan to use Emu-MPS or if you require specific feature-upgrades.


## Getting started

You can install from source, or download the package from the private pypi registry that pasqal maintains in gitlab.
For developers, we recommend installing from source, for users we recommend installing from the registry.
## Installation

**Warning:** installing emu-mps will update pulser-core

We always recommend using a virtual environment.

<details>
<summary>Click me to see how it is done</summary>

#### Create a virtual environment using python

```
python -m venv .venv
```

Or

```
python -m venv /path/to/new/virtual/environment
```

Replace `/path/to/new/virtual/environment` with your desired directory path.

Then activate the environment On linux or MacOS
### Using `hatch`, `uv` or any pyproject-compatible Python manager

```
source /path/to/new/virtual/environment/bin/activate
```
To add `emu-mps` to your project, edit your `pyproject.toml` to add the line

While on Windows it's

```
C:\> /path/to/new/virtual/environment/Scripts/activate
```
```toml
"emu-mps"
```

Remember to replace `/path/to/new/virtual/environment` with the actual path to your virtual environment. Once the environment is activated, you can clone emu_mps and install it using
to the list of `dependencies`.

</details>

### installing from the registry
### Using `pip` or `pipx`
To install the `pipy` package using `pip` or `pipx`

When pip is configured to know about the pasqal registry, Emu-MPS installs as
1. Create a `venv` if that's not done yet

```bash
pip install emu-mps
```
When pip is not already configured, the easiest way to do so, is to add a file `~/.config/pip/pip.conf` containing:
```sh
$ python -m venv venv

```
[global]
extra-index-url=https://gitlab.pasqal.com/api/v4/projects/597/packages/pypi/simple
possible.other.urls
```

As this shows, it is also possible to have multiple extra repositories configured. Note that the order is not important.

It is also possible to add the `extra-index-url` to the `pip install` command directly, if you somehow don't want to create a `pip.conf` file.

### installing from source
git clone this [repository ](https://gitlab.pasqal.com/emulation/rydberg-atoms/emu-ct) or download
2. Enter the venv

If you're running Unix:

Then, `cd` into the root folder of the repo and type

```bash
pip install -e .
```sh
$ . venv/bin/activate
```

<details>
<summary>Guidelines for developers </summary>
We recommend using an environment, git clone the repository, then inside the `emu_mps` folder
If you're running Windows:

```bash
pip install -e .
```sh
C:\> /path/to/new/virtual/environment/Scripts/activate
```

Also, the installation of pytest, nbmake, pre-commit.

Do not forget to run the unit test suite by simply running `pytest` command.

Another way can be using hatch.
3. Install the package

#### virtual environment with `hatch`
```sh
$ pip install emu-mps
# or
$ pipx install emu-mps
```

```bash
python -m pip install hatch
python -m hatch -v shell
```

When inside the shell with development dependencies, install first the pre-commit hook:
```
pre-commit install
```
</details>
Join us on [Slack](https://pasqalworkspace.slack.com/archives/C07MUV5K7EU) or by [e-mail](mailto:emulation@pasqal.com) to give us feedback about how you plan to use Emu-MPS or if you require specific feature-upgrades.

## Check the tutorial notebooks and example scripts
## Usage

For more information, you can check the tutorials and examples located in the [examples folder](https://gitlab.pasqal.com/emulation/rydberg-atoms/emu-ct/-/tree/main/examples?ref_type=heads)
For the time being, the easiest way to learn how to use this package is to look
at the [examples](examples/emu_mps_examples) and [notebooks](https://pasqal-io.github.io/emulators/latest/).

## Documentation
See also the [full documentation](https://github.com/pasqal-io/emulators/blob/main/docs/index.md) for
the API, information about contributing, benchmarks, etc.

Please check the [documentation](./docs/index.md) page for more info about contributing, the API, benchmarks, etc.

## Getting in touch

![Code Coverage](https://img.shields.io/badge/Coverage-95%25-brightgreen.svg)
- [Pasqal Community Portal](https://community.pasqal.com/) (forums, chat, tutorials, examples, code library).
- [GitHub Repository](https://github.com/pasqal-io/quantum-evolution-kernel) (source code, issue tracker).
- [Professional Support](https://www.pasqal.com/contact-us/) (if you need tech support, custom licenses, a variant of this library optimized for your workload, your own QPU, remote access to a QPU, ...)
4 changes: 2 additions & 2 deletions ci/emu_base/pyproject.toml
Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@ authors = [
]
url="https://gitlab.pasqal.com/emulation/rydberg-atoms/emu-ct"
requires-python = ">=3.10"
license = {text = "Proprietary"}
license = {text = "MIT-derived"}
classifiers=[
"License :: Other/Proprietary License",
"License :: MIT-derived",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
4 changes: 2 additions & 2 deletions ci/emu_mps/pyproject.toml
Original file line number Diff line number Diff line change
@@ -14,9 +14,9 @@ authors = [
]
url="https://gitlab.pasqal.com/emulation/rydberg-atoms/emu-ct"
requires-python = ">=3.10"
license = {text = "Proprietary"}
license = {text = "MIT-derived"}
classifiers=[
"License :: Other/Proprietary License",
"License :: MIT-derived",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@ authors = [
{ name = "Pablo Le Henaff", email="pablo.le-henaff@pasqal.com" }
]
requires-python = ">=3.10"
license = {text = "Proprietary"}
license = {text = "MIT-derived"}
classifiers=[
"License :: Other/Proprietary License",
"License :: MIT-derived",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",

0 comments on commit aa40229

Please sign in to comment.