# 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 <b.l.vanstraaten@tudelft.nl>, 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/b1/4f/9da13b954124163c74eb966ff37adadd199548ec466cc764dcfba209439e/qarray-1.4.4.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.4.4",
"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": "938e7ebf374ebf195c7bcc16933ef4bcaa32d4daad9fc372ede6999efb4dd4cc",
"md5": "a2c47492217ae726b564c41bc23daf0e",
"sha256": "87761a6eb328be1d49e62a29978ad16df6b7f41c7fd160a0bdc22cf1ae889f03"
},
"downloads": -1,
"filename": "qarray-1.4.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a2c47492217ae726b564c41bc23daf0e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 66216,
"upload_time": "2024-12-07T12:22:42",
"upload_time_iso_8601": "2024-12-07T12:22:42.852859Z",
"url": "https://files.pythonhosted.org/packages/93/8e/7ebf374ebf195c7bcc16933ef4bcaa32d4daad9fc372ede6999efb4dd4cc/qarray-1.4.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b14f9da13b954124163c74eb966ff37adadd199548ec466cc764dcfba209439e",
"md5": "9721439cdd4bb3c645c04803bf365c31",
"sha256": "eaf33ff653a41cfef89ef791e99902ffde092fb2c3803707064d53800c8316f1"
},
"downloads": -1,
"filename": "qarray-1.4.4.tar.gz",
"has_sig": false,
"md5_digest": "9721439cdd4bb3c645c04803bf365c31",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 5092778,
"upload_time": "2024-12-07T12:22:45",
"upload_time_iso_8601": "2024-12-07T12:22:45.344522Z",
"url": "https://files.pythonhosted.org/packages/b1/4f/9da13b954124163c74eb966ff37adadd199548ec466cc764dcfba209439e/qarray-1.4.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-07 12:22:45",
"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"
}