<commit_before>[![Travis-CI](https://travis-ci.org/ngnrsaa/qflex.svg?branch=master "Travis-CI")](https://travis-ci.org/ngnrsaa/qflex)
[![Code Coverage](https://img.shields.io/lgtm/grade/python/github/ngnrsaa/qflex.svg)](https://lgtm.com/projects/g/ngnrsaa/qflex)<br>
[![Nature](https://img.shields.io/static/v1?label=Nature&message=doi:10.5061/dryad.k6t1rj8&color=success)](https://www.nature.com/articles/s41586-019-1666-5)
[![NPJ Quantum Information](https://img.shields.io/static/v1?label=NPJ-QI&message=doi:10.1038/s41534-019-0196-1&color=success)](https://doi.org/10.1038/s41534-019-0196-1)
[![arXiv](https://img.shields.io/static/v1?label=arXiv&message=1905.00444&color=inactive)](https://arxiv.org/abs/1905.00444)

# qFlex: A flexible high-performance simulator for verifying and benchmarking quantum circuits implemented on real hardware

## Description

Flexible Quantum Circuit Simulator (qFlex) implements an efficient tensor
network, CPU-based simulator of large quantum circuits. qFlex computes exact
probability amplitudes, a task that proves essential for the verification of
quantum hardware, as well as mimics quantum machines by computing amplitudes
with low fidelity. qFlex targets quantum circuits in the range of sizes expected
for supremacy experiments based on random quantum circuits, in order to verify
and benchmark such experiments.

## Documentation

qFlex scientific documentation and results can be found in
[[1]](https://arxiv.org/abs/1811.09599),
[[2]](https://arxiv.org/abs/1905.00444) and
[[3]](https://www.nature.com/articles/s41586-019-1666-5). 
For technical documentation on how to
use qFlex, see [qflex/docs](/docs).

[[1]](https://arxiv.org/abs/1811.09599) <NAME>, *et al.*, **"A flexible
high-performance simulator for verifying and benchmarking quantum circuits
implemented on real hardware"**, NPJ Quantum Information 5, 86 (2019)

[[2]](https://arxiv.org/abs/1905.00444) <NAME>, *et al.*, **"Establishing
the Quantum Supremacy Frontier with a 281 Pflop/s Simulation"**,
arXiv:1905.00444 (2019)

[[3]](https://www.nature.com/articles/s41586-019-1666-5) **"Quantum supremacy
using a programmable superconducting processor"**,
Nature 574, 505–510 (2019)

## Build methods

To ensure cross-platform viability, qFlex supports multiple different build
methods. If one of the build methods below does not work on your system, try
using one of the other methods listed.

Known incompatibilities:

-   MacOS only supports building via Docker.

### Local installation

To build qFlex on your machine, simply run:

```
$ autoreconf -i && autoconf && ./configure
$ make && make run-tests
```

To disable qFlex python interface, use `./configure --disable-pybind11`.

After running these commands, qFlex can be installed by running `make install`.
By default, this installs qFlex in `$HOME/local/`. To change the installation
folder, use `./configure --prefix=/new/installation/folder/`.

qFlex provides an experimental support for `OpenMP`. To activate `OpenMP`, run
`./configure` with the extra-option `--enable-openmp`.

For more information, see [the installation guide](/docs/install.md).

### Build Using Docker

[Docker](https://docker.com) allows you to run qFlex in an isolated environment,
without having to worry about managing dependencies.

To build qFlex with Docker, see [the Docker guide](/docs/docker.md).

### Build Using Rootless Containers

Rootless containers are an alternative to Docker targeted at users who may not<commit_msg>Update reference to automated Docker container.<commit_after>[![Travis-CI](https://travis-ci.org/ngnrsaa/qflex.svg?branch=master "Travis-CI")](https://travis-ci.org/ngnrsaa/qflex)
[![Code Coverage](https://img.shields.io/lgtm/grade/python/github/ngnrsaa/qflex.svg)](https://lgtm.com/projects/g/ngnrsaa/qflex)<br>
[![Nature](https://img.shields.io/static/v1?label=Nature&message=doi:10.5061/dryad.k6t1rj8&color=success)](https://www.nature.com/articles/s41586-019-1666-5)
[![NPJ Quantum Information](https://img.shields.io/static/v1?label=NPJ-QI&message=doi:10.1038/s41534-019-0196-1&color=success)](https://doi.org/10.1038/s41534-019-0196-1)
[![arXiv](https://img.shields.io/static/v1?label=arXiv&message=1905.00444&color=inactive)](https://arxiv.org/abs/1905.00444)

# qFlex: A flexible high-performance simulator for verifying and benchmarking quantum circuits implemented on real hardware

## Description

Flexible Quantum Circuit Simulator (qFlex) implements an efficient tensor
network, CPU-based simulator of large quantum circuits. qFlex computes exact
probability amplitudes, a task that proves essential for the verification of
quantum hardware, as well as mimics quantum machines by computing amplitudes
with low fidelity. qFlex targets quantum circuits in the range of sizes expected
for supremacy experiments based on random quantum circuits, in order to verify
and benchmark such experiments.

## Documentation

qFlex scientific documentation and results can be found in
[[1]](https://arxiv.org/abs/1811.09599),
[[2]](https://arxiv.org/abs/1905.00444) and
[[3]](https://www.nature.com/articles/s41586-019-1666-5). 
For technical documentation on how to
use qFlex, see [qflex/docs](/docs).

[[1]](https://arxiv.org/abs/1811.09599) <NAME>, *et al.*, **"A flexible
high-performance simulator for verifying and benchmarking quantum circuits
implemented on real hardware"**, NPJ Quantum Information 5, 86 (2019)

[[2]](https://arxiv.org/abs/1905.00444) <NAME>, *et al.*, **"Establishing
the Quantum Supremacy Frontier with a 281 Pflop/s Simulation"**,
arXiv:1905.00444 (2019)

[[3]](https://www.nature.com/articles/s41586-019-1666-5) **"Quantum supremacy
using a programmable superconducting processor"**,
Nature 574, 505–510 (2019)

## Build methods

To ensure cross-platform viability, qFlex supports multiple different build
methods. If one of the build methods below does not work on your system, try
using one of the other methods listed.

Known incompatibilities:

-   MacOS only supports building via Docker.

### Local installation

To build qFlex on your machine, simply run:

```
$ autoreconf -i && autoconf && ./configure
$ make && make run-tests
```

To disable qFlex python interface, use `./configure --disable-pybind11`.

After running these commands, qFlex can be installed by running `make install`.
By default, this installs qFlex in `$HOME/local/`. To change the installation
folder, use `./configure --prefix=/new/installation/folder/`.

qFlex provides an experimental support for `OpenMP`. To activate `OpenMP`, run
`./configure` with the extra-option `--enable-openmp`.

For more information, see [the installation guide](/docs/install.md).

### Build Using Docker

[Docker](https://docker.com) allows you to run qFlex in an isolated environment,
without having to worry about managing dependencies.

To build qFlex with Docker, see [the Docker guide](/docs/docker.md).

An automated qFlex Docker container, synced with the `master` branch, can be
pulled from Docker Hub as:
```
$ docker pull ngnrsaa/qflex
```

### Build Using Rootless Containers

Rootless containers are an alternative to Docker targeted at users who may not
{'fraction_non_alphanumeric': 0.12662837932483542, 'fraction_numerical': 0.05238828967642527, 'mean_word_length': 5.16580310880829, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 34, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1930838', 'n_tokens_mistral': 2549, 'n_tokens_neox': 2128, 'n_words': 690}