Metadata-Version: 2.4
Name: qxelarator
Version: 0.10.0
Summary: qxelarator Python Package
Home-page: https://github.com/QuTech-Delft/qx-simulator
Author: QuTech, TU Delft
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Description-Content-Type: text/markdown
License-File: LICENSE.md
License-File: AUTHORS
Requires-Dist: msvc-runtime; platform_system == "Windows"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# QX simulator

[![CI](https://github.com/QuTech-Delft/qx-simulator/workflows/Test/badge.svg)](https://github.com/qutech-delft/qx-simulator/actions)
[![cpp-linter](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml/badge.svg)](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml)
[![PyPI](https://badgen.net/pypi/v/qxelarator)](https://pypi.org/project/qxelarator/)
![OS](https://img.shields.io/badge/os-linux%20%7C%20macos%20%7C%20windows-blue?style=flat-square)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

QX simulator is a simulator of cQASM programs, developed by QuTech.
At the moment, QX simulator only supports cQASM v3.0 programs
(see [cQASM-spec](https://qutech-delft.github.io/cQASM-spec/latest/) for the language specification).

It performs simulations of input programs received via file or string.
It produces one of the following results:

- A simulation result: a quantum state and, optionally, a list of measurements.
- An error. In case the input program was malformed or the simulation failed.

It can be used:

- As a standalone executable (built from C++), from the command line.
- As a module (called `qxelarator`), from Python projects (as a [Python package](https://pypi.org/project/libqasm/)).

## cQASM v3.0 specification coverage

QX simulator has the following shortcomings regarding to the current cQASM v3.0 specification:

- Power gate modifier can only be used with integer exponents, not with fractional (rational or irrational) ones.

## Getting started

Given a cQASM program `example.cq`.

```cQASM
version 3.0

qubit[2] q
bit[2] b

H q[0]
CNOT q[0], q[1]
b = measure q
```

We can simulate this circuit using QX simulator, either from the command line, or with a Python script.

### Command line

```shell
build/Release# ./qx-simulator -c 1000 example.cq
```

### Python

```python
import qxelarator

if __name__ == "__main__":
    result = qxelarator.execute_file('example.cq', iterations=1000)
    print(result)
```

## Documentation

The [QX simulator documentation](https://QuTech-Delft.github.io/qx-simulator/) is hosted through GitHub Pages.

## License

QX simulator is licensed under the Apache License, Version 2.0.
See [LICENSE](https://github.com/QuTech-Delft/libqasm/blob/master/LICENSE.md) for the full license text.

## Authors

Quantum Inspire: [support@quantum-inspire.com](mailto:"support@quantum-inspire.com")
