# QArray
![PyPI](https://img.shields.io/pypi/v/qarray)
[![arXiv](https://img.shields.io/badge/arXiv-2404.04994-Green.svg)](https://arxiv.org/abs/2404.04994)
[![Read the Docs](https://img.shields.io/readthedocs/qarray)](https://qarray.readthedocs.io/en/latest/introduction.html)
![GitHub Workflow Status](https://github.com/b-vanstraaten/qarray/actions/workflows/windows_tests.yaml//badge.svg)
![GitHub Workflow Status](https://github.com/b-vanstraaten/qarray/actions/workflows/macos_tests.yaml//badge.svg)
![GitHub Workflow Status](https://github.com/b-vanstraaten/qarray/actions/workflows/linux_tests.yaml//badge.svg)
Paper: [QArray: a GPU-accelerated constant capacitance model simulator for large quantum dot arrays; Barnaby van Straaten, Joseph Hickie, Lucas Schorling, Jonas Schuff, Federico Fedele, Natalia Ares](https://arxiv.org/abs/2404.04994)
Documentation:[https://qarray.readthedocs.io/en/latest/introduction.html](https://qarray.readthedocs.io/en/latest/introduction.html)
**QArray** harnesses the speed of the systems programming language Rust or the compute power of GPUs using JAX XLA
to deliver constant capacitance model charge stability diagrams in seconds or milliseconds. It couples
highly optimised and parallelised code with two new algorithms to compute the ground state charge configuration. These
algorithms scale better than the traditional brute-force approach and do not require the user to specify
the maximum number of charge carriers a priori.
QArray runs on both CPUs and GPUs and is designed to be easy to use and integrate into existing workflows. It was
developed on macOS running on Apple Silicon and is continuously tested on Ubuntu-latest, macOS13, macos14,
Windows-latest.
Finally, QArray captures physical effects, such as measuring the charge stability diagram with a SET and thermal
broadening of charge transitions. The combination of these effects permits the simulation of charge stability diagrams,
which are visually similar to those measured experimentally.
## Installation
We have tried to precompile the binaries for as many platforms as possible if you are running one
of those operating systems, you can install QArray with just pip:
```bash
pip install qarray
```
If you slip through the gaps, then the pip install will try to compile the binaries for you. This might require you to
install some additional dependencies. In particular, you might need to have cmake and Rust installed.
Install rust from:
[https://www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install)
Install CMake from:
[https://cmake.org/download/](https://cmake.org/download/).
However, on macOS and Ubuntu, you can install cmake using homebrew and apt, respectively.
Also, setting up JAX on macOS running on M series chips can be a bit finicky. We outline the steps
that worked for us in the macOS installation section below. Alternatively, just spin up
a [Github Codespace](https://github.com/codespaces), then ```pip install qarray``` and
you are done.
For more information on the installation process, see
the [installation guide](https://qarray.readthedocs.io/en/latest/installation.html). To
install directly from the repository use the command below:
```bash
pip install git+https://github.com/b-vanstraaten/qarray.git@main
```
## Getting started - double quantum dot example
```python
from qarray import DotArray
Cdd = [
[0., 0.2, 0.05, 0.01],
[0.2, 0., 0.2, 0.05],
[0.05, 0.2, 0.0, 0.2],
[0.01, 0.05, 0.2, 0]
]
Cgd = [
[1., 0, 0, 0],
[0, 1., 0, 0.0],
[0, 0, 1., 0],
[0, 0, 0, 1]
]
# setting up the constant capacitance
model = DotArray(
Cdd=Cdd,
Cgd=Cgd,
)
model.run_gui()
```
## Examples
The examples folder contains a number of examples that demonstrate how to use the package to simulate different quantum
dot systems.
1. [Double Quantum Dot](https://github.com/b-vanstraaten/qarray/blob/main/examples/double_dot.ipynb)
2. [Linear Triple Quantum Dot](https://github.com/b-vanstraaten/qarray/blob/main/examples/linear_triple_dot.py)
3. [Linear Quadruple Quantum Dot](https://github.com/b-vanstraaten/qarray/blob/main/examples/linear_quadruple_dot.py)
4. [Charge sensed double quantum dot](https://github.com/b-vanstraaten/qarray/blob/main/examples/charge_sensing.py)
Raw data
{
"_id": null,
"home_page": null,
"name": "qarray",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "semiconducting, quantum dots, quantum, simulation, GPU, rust, jax, quantum computing, quantum programming, quantum simulation, quantum optimization",
"author": null,
"author_email": "Barnaby van Straaten <barnaby.vanstraaten@kellogg.ox.ac.uk>, Joseph Hickie <joseph.hickie@trinity.ox.ac.uk>, Jonas Schuff <jonas.schuffn@materials.ox.ac.uk>, Cornelius Carlsson <cornelius.carlsson@eng.ox.ac.uk>",
"download_url": "https://files.pythonhosted.org/packages/a1/1d/7f35194b761a11baf073649f1e8f63a4cecaaf003fc8d8fbc822b616074f/qarray-1.3.5.tar.gz",
"platform": null,
"description": "# QArray\n![PyPI](https://img.shields.io/pypi/v/qarray)\n[![arXiv](https://img.shields.io/badge/arXiv-2404.04994-Green.svg)](https://arxiv.org/abs/2404.04994)\n[![Read the Docs](https://img.shields.io/readthedocs/qarray)](https://qarray.readthedocs.io/en/latest/introduction.html)\n![GitHub Workflow Status](https://github.com/b-vanstraaten/qarray/actions/workflows/windows_tests.yaml//badge.svg)\n![GitHub Workflow Status](https://github.com/b-vanstraaten/qarray/actions/workflows/macos_tests.yaml//badge.svg)\n![GitHub Workflow Status](https://github.com/b-vanstraaten/qarray/actions/workflows/linux_tests.yaml//badge.svg)\n\n\nPaper: [QArray: a GPU-accelerated constant capacitance model simulator for large quantum dot arrays; Barnaby van Straaten, Joseph Hickie, Lucas Schorling, Jonas Schuff, Federico Fedele, Natalia Ares](https://arxiv.org/abs/2404.04994)\n\nDocumentation:[https://qarray.readthedocs.io/en/latest/introduction.html](https://qarray.readthedocs.io/en/latest/introduction.html)\n\n**QArray** harnesses the speed of the systems programming language Rust or the compute power of GPUs using JAX XLA\nto deliver constant capacitance model charge stability diagrams in seconds or milliseconds. It couples\nhighly optimised and parallelised code with two new algorithms to compute the ground state charge configuration. These\nalgorithms scale better than the traditional brute-force approach and do not require the user to specify\nthe maximum number of charge carriers a priori.\n\nQArray runs on both CPUs and GPUs and is designed to be easy to use and integrate into existing workflows. It was\ndeveloped on macOS running on Apple Silicon and is continuously tested on Ubuntu-latest, macOS13, macos14,\nWindows-latest.\n\nFinally, QArray captures physical effects, such as measuring the charge stability diagram with a SET and thermal\nbroadening of charge transitions. The combination of these effects permits the simulation of charge stability diagrams,\nwhich are visually similar to those measured experimentally.\n\n## Installation\n\nWe have tried to precompile the binaries for as many platforms as possible if you are running one\nof those operating systems, you can install QArray with just pip:\n```bash\npip install qarray\n```\n\nIf you slip through the gaps, then the pip install will try to compile the binaries for you. This might require you to\ninstall some additional dependencies. In particular, you might need to have cmake and Rust installed.\n\nInstall rust from:\n[https://www.rust-lang.org/tools/install](https://www.rust-lang.org/tools/install)\n\nInstall CMake from:\n[https://cmake.org/download/](https://cmake.org/download/).\nHowever, on macOS and Ubuntu, you can install cmake using homebrew and apt, respectively.\n\nAlso, setting up JAX on macOS running on M series chips can be a bit finicky. We outline the steps\nthat worked for us in the macOS installation section below. Alternatively, just spin up\na [Github Codespace](https://github.com/codespaces), then ```pip install qarray``` and\nyou are done.\n\nFor more information on the installation process, see\nthe [installation guide](https://qarray.readthedocs.io/en/latest/installation.html). To\ninstall directly from the repository use the command below:\n\n```bash\n pip install git+https://github.com/b-vanstraaten/qarray.git@main\n```\n\n## Getting started - double quantum dot example\n\n```python\nfrom qarray import DotArray\n\nCdd = [\n [0., 0.2, 0.05, 0.01],\n [0.2, 0., 0.2, 0.05],\n [0.05, 0.2, 0.0, 0.2],\n [0.01, 0.05, 0.2, 0]\n]\n\nCgd = [\n [1., 0, 0, 0],\n [0, 1., 0, 0.0],\n [0, 0, 1., 0],\n [0, 0, 0, 1]\n]\n\n# setting up the constant capacitance\nmodel = DotArray(\n Cdd=Cdd,\n Cgd=Cgd,\n)\nmodel.run_gui()\n```\n## Examples\n\nThe examples folder contains a number of examples that demonstrate how to use the package to simulate different quantum\ndot systems.\n\n1. [Double Quantum Dot](https://github.com/b-vanstraaten/qarray/blob/main/examples/double_dot.ipynb)\n2. [Linear Triple Quantum Dot](https://github.com/b-vanstraaten/qarray/blob/main/examples/linear_triple_dot.py)\n3. [Linear Quadruple Quantum Dot](https://github.com/b-vanstraaten/qarray/blob/main/examples/linear_quadruple_dot.py)\n4. [Charge sensed double quantum dot](https://github.com/b-vanstraaten/qarray/blob/main/examples/charge_sensing.py)\n\n\n\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Qarray, a GPU accelerated quantum dot array simulator, leveraging parallelised Rust and JAX XLA acceleration",
"version": "1.3.5",
"project_urls": {
"Documentation": "https://qarray.readthedocs.io/en/latest/",
"Home": "https://github.com/b-vanstraaten/qarray",
"Issues": "https://github.com/b-vanstraaten/qarray/issues",
"Repository": "https://github.com/b-vanstraaten/qarray"
},
"split_keywords": [
"semiconducting",
" quantum dots",
" quantum",
" simulation",
" gpu",
" rust",
" jax",
" quantum computing",
" quantum programming",
" quantum simulation",
" quantum optimization"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9612e6227976ac6aa020364e0773c9706312b682d27bca3f092f8a55c541d0bc",
"md5": "f3ac9d88393a43901d919057e343b292",
"sha256": "38d21d11971fe638f5f603ab9aff52f066c8e8b4b249e268ecc2892379d9807e"
},
"downloads": -1,
"filename": "qarray-1.3.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f3ac9d88393a43901d919057e343b292",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 50495,
"upload_time": "2024-09-30T18:36:22",
"upload_time_iso_8601": "2024-09-30T18:36:22.833425Z",
"url": "https://files.pythonhosted.org/packages/96/12/e6227976ac6aa020364e0773c9706312b682d27bca3f092f8a55c541d0bc/qarray-1.3.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a11d7f35194b761a11baf073649f1e8f63a4cecaaf003fc8d8fbc822b616074f",
"md5": "6ac38357ee783e78681aadaddfc522f4",
"sha256": "16c4683426ab4674d2f013d3ee75d3e76573e92135029ddfd1a85fa3d80d78b0"
},
"downloads": -1,
"filename": "qarray-1.3.5.tar.gz",
"has_sig": false,
"md5_digest": "6ac38357ee783e78681aadaddfc522f4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 5594757,
"upload_time": "2024-09-30T18:36:24",
"upload_time_iso_8601": "2024-09-30T18:36:24.736882Z",
"url": "https://files.pythonhosted.org/packages/a1/1d/7f35194b761a11baf073649f1e8f63a4cecaaf003fc8d8fbc822b616074f/qarray-1.3.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-30 18:36:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "b-vanstraaten",
"github_project": "qarray",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "qarray-rust-core",
"specs": [
[
"==",
"1.3.1"
]
]
},
{
"name": "osqp",
"specs": [
[
"==",
"0.6.3"
]
]
},
{
"name": "numpy",
"specs": [
[
"<",
"2"
]
]
},
{
"name": "scipy",
"specs": [
[
">=",
"1.11"
]
]
},
{
"name": "matplotlib",
"specs": [
[
">=",
"3.8"
]
]
},
{
"name": "loguru",
"specs": [
[
">=",
"0.5"
]
]
},
{
"name": "jax",
"specs": [
[
">=",
"0.2"
]
]
},
{
"name": "jaxopt",
"specs": [
[
">=",
"0.4"
]
]
},
{
"name": "tqdm",
"specs": [
[
">=",
"4.62"
]
]
},
{
"name": "pandas",
"specs": [
[
">=",
"2.2"
]
]
},
{
"name": "dash",
"specs": [
[
">=",
"2.17"
]
]
},
{
"name": "plotly",
"specs": [
[
">=",
"5.22"
]
]
}
],
"lcname": "qarray"
}