{"id":13536078,"url":"https://github.com/QuEST-Kit/QuEST","last_synced_at":"2025-04-02T02:32:14.840Z","repository":{"id":19187141,"uuid":"86454800","full_name":"QuEST-Kit/QuEST","owner":"QuEST-Kit","description":"A multithreaded, distributed, GPU-accelerated simulator of quantum computers","archived":false,"fork":false,"pushed_at":"2024-10-27T22:03:23.000Z","size":18903,"stargazers_count":393,"open_issues_count":47,"forks_count":136,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-10-30T17:51:26.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://quest.qtechtheory.org/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuEST-Kit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-28T12:00:18.000Z","updated_at":"2024-10-25T09:54:34.000Z","dependencies_parsed_at":"2023-01-17T00:45:41.586Z","dependency_job_id":"b2cd5879-2e9c-4b0b-8c36-bf29e15f15fd","html_url":"https://github.com/QuEST-Kit/QuEST","commit_stats":{"total_commits":1156,"total_committers":25,"mean_commits":46.24,"dds":0.3780276816608996,"last_synced_commit":"d4f75f724993b4af8e43a796e3c09ce24ae11670"},"previous_names":["aniabrown/quest"],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuEST-Kit%2FQuEST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuEST-Kit%2FQuEST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuEST-Kit%2FQuEST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuEST-Kit%2FQuEST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuEST-Kit","download_url":"https://codeload.github.com/QuEST-Kit/QuEST/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246358261,"owners_count":20764366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T09:00:34.479Z","updated_at":"2025-04-02T02:32:14.816Z","avatar_url":"https://github.com/QuEST-Kit.png","language":"C++","funding_links":[],"categories":["Quantum SDKs","C++","Simulators"],"sub_categories":[],"readme":"\n\u003c!-- This README avoids relative paths since it is also used as Doxygen's mainpage --\u003e\n\n\n\n\u003c!-- temporary v4 advertisement --\u003e\n\u003e [!IMPORTANT]\n\u003e QuEST _**v4**_ is coming very soon with a new API, which is both greatly extended and accelerated. See some of the new features listed on the [Discussions](https://github.com/QuEST-Kit/QuEST/discussions) page. If you are beginning a new project with QuEST, consider using the in-development [v4](https://github.com/QuEST-Kit/QuEST/tree/v4) source. While this version is mostly complete, it currently lacks documentation and full unit tests. Please contact Tyson at `tyson.jones.input@gmail.com` to understand whether the v4 draft is safe to use in your application, and for help getting it running.\n\n\n\n\n\u003c!-- banner --\u003e\n[\u003cimg src=\"https://github.com/QuEST-Kit/QuEST/blob/master/doxyconfig/banner.png?raw=true\" alt=\"The QuEST logo\" width=500\u003e](https://quest.qtechtheory.org)\n\n\n\u003c!-- temporarily hiding Github Actions badges (pending aesthetic customisation)\n    [![Ubuntu unit](https://github.com/QuEST-Kit/QuEST/workflows/Ubuntu%20unit/badge.svg?branch=develop)](https://github.com/QuEST-Kit/QuEST/actions)\n    [![macOS unit](https://github.com/QuEST-Kit/QuEST/workflows/macOS%20unit/badge.svg)](https://github.com/QuEST-Kit/QuEST/actions)\n    [![LLVM](https://github.com/QuEST-Kit/QuEST/workflows/LLVM%20asan/badge.svg)](https://github.com/QuEST-Kit/QuEST/actions)\n --\u003e\n\u003c!-- temporarily hiding incorrect coverage statistics \n(currently only considers serial CPU; needs also GPU and distributed test contributions)\n    [![codecov](https://codecov.io/gh/QuEST-Kit/QuEST/branch/develop/graph/badge.svg)](https://codecov.io/gh/QuEST-Kit/QuEST)\n--\u003e\n\n\n\n\u003c!-- action-badges has broken and is incorrectly showing build failure. \n     temporarily forcing badge to show the correct pass while replacement is sought \n     (that isn't Github's hideous default CI badge)\n     [![unit tests](https://action-badges.now.sh/QuEST-Kit/QuEST)](https://github.com/QuEST-Kit/QuEST/actions) \n--\u003e \n[![GitHub release](https://img.shields.io/github/release/QuEST-Kit/QuEST)](https://GitHub.com/QuEST-Kit/QuEST/releases/) \n[![Doc](https://img.shields.io/badge/doc-Github.io-orange.svg)](https://quest-kit.github.io/QuEST/modules.html)\n[![unit tests](https://img.shields.io/badge/build-passing-green.svg)](https://github.com/QuEST-Kit/QuEST/actions)  \u003c!-- forgive my sins (see above) --\u003e\n[![MIT license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](LICENCE.txt)\n\n\nThe **Quantum Exact Simulation Toolkit** is a high performance simulator of quantum circuits, state-vectors and density matrices. QuEST uses **multithreading**, **GPU acceleration** and **distribution** to run lightning first on laptops, desktops and networked supercomputers. \nQuEST *just works*; it is stand-alone, requires no installation, and is trivial to compile and run. \nQuEST hybridises [OpenMP](https://www.openmp.org/) and [MPI](https://www.mpi-forum.org/) with _huge_ compiler support to run on all sorts of multicore, multi-CPU and distributed hardware, uses [HIP](https://docs.amd.com/bundle/HIP-Programming-Guide-v5.3) to run on AMD GPUs, integrates [cuQuantum](https://developer.nvidia.com/cuquantum-sdk) and [Thrust](https://developer.nvidia.com/thrust) for cutting-edge performance on modern NVIDIA GPUs, and has a custom kernel backend to run on older CUDA-compatible GPUs. \nAnd it hides these deployment modes behind a single, seamless interface.\n\n[![Languages](https://img.shields.io/badge/C-99-ff69b4.svg)](http://www.open-std.org/jtc1/sc22/wg14/www/standards.html#9899)\n[![Languages](https://img.shields.io/badge/C++-11-ff69b4.svg)](https://isocpp.org/wiki/faq/cpp11)\n![OS](https://img.shields.io/badge/os-MacOS-9cbd3c.svg)\n![OS](https://img.shields.io/badge/os-Linux-9cbd3c.svg)\n![OS](https://img.shields.io/badge/os-Windows-9cbd3c.svg)\n[![Platforms](https://img.shields.io/badge/multithreaded-OpenMP-6699ff.svg)](https://www.openmp.org/)\n[![Platforms](https://img.shields.io/badge/distributed-MPI-6699ff.svg)](https://www.mpi-forum.org/) \n[![Platforms](https://img.shields.io/badge/GPU-CUDA-6699ff.svg)](https://developer.nvidia.com/cuda-zone)\n[![Platforms](https://img.shields.io/badge/GPU-AMD-6699ff.svg)](https://docs.amd.com/bundle/HIP-Programming-Guide-v5.3)\n[![Platforms](https://img.shields.io/badge/GPU-cuQuantum-6699ff.svg)](https://developer.nvidia.com/cuquantum-sdk)\n\nQuEST is developed by the [QTechTheory](http://qtechtheory.org/) group at the University of Oxford, with support of the UK [National Quantum Computing centre](https://www.nqcc.ac.uk/) (_NQCC200921_), and [these authors](https://github.com/QuEST-Kit/QuEST/blob/master/AUTHORS.txt). To learn more:\n- see the [tutorial](https://github.com/QuEST-Kit/QuEST/blob/master/examples/README.md)\n- view the [documentation](#book-documentation)\n- visit the [website](https://quest.qtechtheory.org/)\n- see some [examples](https://github.com/QuEST-Kit/QuEST/blob/master/examples/)\n- read the [whitepaper](https://www.nature.com/articles/s41598-019-47174-9), which featured in Scientific Report's [Top 100 in Physics](https://www.nature.com/collections/ecehgdfcba/) :trophy:\n\n[![DOI](https://img.shields.io/badge/DOI-10.1038%2Fs41598--019--47174--9-yellow.svg)](https://doi.org/10.1038/s41598-019-47174-9)\n[![Email](https://img.shields.io/badge/email-quest@materials.ox.ac.uk-red.svg)](mailto:quest@materials.ox.ac.uk)\n\n---------------------------------\n\n## test\n\n\n## :tada:\u0026nbsp; Introduction\n\nQuEST has a simple interface, which is agnostic to its runtime environment, between CPUs, GPUs and over networks.\n```C\nhadamard(qubits, 0);\n\ncontrolledRotateX(qubits, 0, 1, angle);\n\ndouble prob = calcProbOfOutcome(qubits, 0, outcome);\n```\nYet, it is flexible\n```C\nVector v;\nv.x = 1; v.y = .5; v.z = 0;\nrotateAroundAxis(qubits, 0, angle, v);\n\nComplexMatrix2 u = {\n    .real = {{.5, .5}, { .5,.5}},\n    .imag = {{.5,-.5}, {-.5,.5}}};\nunitary(qubits, 0, u);\n\nmixDepolarising(qubits, 0, prob);\n```\nand extremely powerful\n```C\nComplexMatrixN u = createComplexMatrixN(5);\nint ctrls[] = {0, 1, 2};\nint targs[] = {5, 20, 15, 10, 25};\nmultiControlledMultiQubitUnitary(qubits, ctrls, 3, targs, 5, u);\n\nComplexMatrixN k1, k2, k3 = ...\nmixMultiQubitKrausMap(qubits, targs, 5, {k1, k2, k3}, 3);\n\ndouble val = calcExpecPauliHamil(qubits, hamiltonian, workspace);\n\napplyTrotterCircuit(qubits, hamiltonian, time, order, repetitions);\n```\n\n---------------------------------\n\n## :white_check_mark:\u0026nbsp; Features \nQuEST supports:  \n- :ballot_box_with_check: \u0026nbsp; **density matrices** for precise simulation of noisy quantum computers  \n- :ballot_box_with_check: \u0026nbsp; **general unitaries** with any number of control and target qubits  \n- :ballot_box_with_check: \u0026nbsp; **general decoherence channels** of any dimension  \n- :ballot_box_with_check: \u0026nbsp; **general Hermitian operators** in the Pauli basis  \n- :ballot_box_with_check: \u0026nbsp; **many *many* operators**, including even [Pauli gadgets](https://quest-kit.github.io/QuEST-develop-doc/group__unitary.html#ga34aa4865c92f9aa5d898c91286c9eca5), [analytic phase functions](https://quest-kit.github.io/QuEST-develop-doc/group__operator.html#ga467f517abd18dbc3d6fced84c6589161) and [Trotter circuits](https://quest-kit.github.io/QuEST-develop-doc/group__operator.html#ga35b6321c578a8c69470132b5ee95f930)  \n- :ballot_box_with_check: \u0026nbsp; **many tools to analyse** quantum states, such as calculations of [probability](https://quest-kit.github.io/QuEST-develop-doc/group__calc.html#gad0cc08d52cad5062553d6f78126780cc), [fidelity](https://quest-kit.github.io/QuEST-develop-doc/group__calc.html#gaa266ed6c8ae5d0d0f49e1ac50819cffc), and [expected value](https://quest-kit.github.io/QuEST-develop-doc/group__calc.html#ga82f17e96a4cb7612fb9c6ef856df3810)  \n- :ballot_box_with_check: \u0026nbsp; **variable precision** through a `qreal` numerical type which can use single, double or quad precision  \n- :ballot_box_with_check: \u0026nbsp; **QASM output** to verify simulated circuits  \n- :ballot_box_with_check: \u0026nbsp; **direct access to amplitudes** for rapid custom modification of the quantum state \n- :ballot_box_with_check: \u0026nbsp; **native compilation** on MacOS, Linux and Windows, through Clang, GNU, Intel, and MSVC compilers\n\n---------------------------------\n\n## :book:\u0026nbsp; Documentation\n\n- The [tutorial](/examples/README.md) includes instructions for\n  - [compiling](/examples/README.md#compiling) QuEST\n  - [running](/examples/README.md#running) QuEST locally and on supercomputers\n  - [testing](/examples/README.md#testing) QuEST using the comprehensive [unit tests](https://quest-kit.github.io/QuEST/group__unittest.html)\n  \u003cbr\u003e\u003cbr\u003e\n- The documentation is divided into the following modules:\n  - [data structures](https://quest-kit.github.io/QuEST/group__type.html)\n  - [initialisations](https://quest-kit.github.io/QuEST/group__init.html)\n  - [unitaries](https://quest-kit.github.io/QuEST/group__unitary.html)\n  - [gates](https://quest-kit.github.io/QuEST/group__normgate.html)\n  - [decoherence](https://quest-kit.github.io/QuEST/group__decoherence.html)\n  - [operators](https://quest-kit.github.io/QuEST/group__operator.html)\n  - [calculations](https://quest-kit.github.io/QuEST/group__calc.html)\n  - [QASM](https://quest-kit.github.io/QuEST/group__qasm.html)\n  \u003cbr\u003e\u003cbr\u003e\n- Additional utilities for debugging and testing are documented below\n  - [debugging](https://quest-kit.github.io/QuEST/group__debug.html)\n  - [unit tests](https://quest-kit.github.io/QuEST/group__unittest.html)\n  - [testing utilities](https://quest-kit.github.io/QuEST/group__testutilities.html)\n\n\n\u003e **For developers**: QuEST's doc is automatically regenerated when the `master` branch is updated via [Github Actions](https://github.com/features/actions). To locally regenerate the doc, run `doxygen doxyconfig/config` in the root directory, which generates html documentation in `Doxygen_doc/html`.\n\n---------------------------------\n\n## :rocket:\u0026nbsp; Getting started \n\nTo rocket right in, download QuEST with [git](https://git-scm.com/) at the terminal\n```bash\ngit clone https://github.com/quest-kit/QuEST.git\ncd QuEST\n```\nCompile the [tutorial](/examples/README.md) example ([source](/examples/tutorial_example.c)) using [cmake](https://cmake.org/) and [make](https://www.gnu.org/software/make/)\n```bash\nmkdir build\ncd build\ncmake ..\nmake\n```\nthen run it with\n```bash\n./demo\n```\n\u003cbr\u003e\n\n\u003e **Windows** users should install [Build Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) for Visual Studio, and [CMake](https://cmake.org/download/), and run the above commmands in the *Developer Command Prompt for VS*, though using build commands\n\u003e ```bash \n\u003e cmake .. -G \"NMake Makefiles\"\n\u003e nmake\n\u003e ```\n\u003e If using MSVC and NMake in this way fails, users can forego GPU acceleration, download\n\u003e [MinGW-w64](https://sourceforge.net/projects/mingw-w64/), and compile via \n\u003e ```bash \n\u003e cmake .. -G \"MinGW Makefiles\"\n\u003e make\n\u003e ```\n\n\n\n\n---------------------------------\n\n## :heart:\u0026nbsp; Acknowledgements\n\nWe sincerely thank the following external contributors to QuEST.\n\n- [Jakub Adamski](https://github.com/jjacobx) for optimising distributed communication of max-size messages.\n- [Bruno Villasenor Alvarez](https://github.com/bvillasen) of [AMD](https://www.amd.com/en.html) for porting the GPU backend to [HIP](https://github.com/ROCm-Developer-Tools/HIP), for compatibility with AMD GPUs.\n- [HQS Quantum simulations](https://quantumsimulations.de/) for contributing `mixDamping` on CPU.\n- [Kshitij Chhabra](https://github.com/kshitijc) for patching some validation bugs.\n- [Drew Silcock](https://github.com/drewsilcock) for patching the multithreaded build on MacOS.\n- [Zach van Rijn](https://github.com/zv-io) for patching the multithreading code for GCC-9 OpenMP-5 compatibility.\n- [SchineCompton](https://github.com/SchineCompton) for patching the GPU CMake release build.\n- [Christopher J. Anders](https://github.com/chr5tphr) for patching the multithreading (when default off) and GPU builds (revising min cmake).\n- [Gleb Struchalin](https://github.com/glebx-f) for patching the cmake standalone build.\n- [Milos Prokop](https://github.com/Milos9304) for serial prototyping of `initDiagonalOpFromPauliHamil`.\n\nQuEST uses the [mt19937ar](http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html) Mersenne Twister algorithm for random number generation, under the BSD licence. QuEST optionally (by additionally importing `QuEST_complex.h`) integrates the [language agnostic complex type](http://collaboration.cmc.ec.gc.ca/science/rpn/biblio/ddj/Website/articles/CUJ/2003/0303/cuj0303meyers/index.htm) by Randy Meyers and Dr. Thomas Plum\n\n---------------------------------\n\n## :newspaper:\u0026nbsp; Related projects\n\n- [QuESTlink](https://questlink.qtechtheory.org)   \u003cbr\u003e\n  a Mathematica package enabling symbolic circuit manipulation, analytic simulation, visualisation and high performance simulation with remote accelerated hardware.\n  \n- [pyQuEST](https://github.com/rrmeister/pyQuEST/tree/master)   \u003cbr\u003e\n  a python interface to QuEST, based on Cython, developed within the [QTechTheory](https://qtechtheory.org) group. Please note, pyQuEST is currently in the alpha stage.\n   \n- [PyQuEST-cffi](https://github.com/HQSquantumsimulations/PyQuEST-cffi)   \u003cbr\u003e\n  a python interface to QuEST based on cffi developed by HQS Quantum Simulations. Please note, PyQuEST-cffi is currently in the alpha stage and not an official QuEST project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQuEST-Kit%2FQuEST","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FQuEST-Kit%2FQuEST","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FQuEST-Kit%2FQuEST/lists"}