| examples | ||
| src | ||
| build.sh | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| README_old.md | ||
QAnsel
A quantum computer simulator which supports hardware acceleration (GPUs) as well as hardware random number generators.
Compilation / Installation
git clone https://www.foleosoft.com/software/QAnsel
cd QAnsel
make
sudo make install
If you are compiling for a device which cannot support
hardware acceleration, then you can use make simple which
will build the program with those features stripped out.
Examples
Many example programs that can be executed inside of QAnsel can
be found in the examples folder.
Usage
The QAnsel simulator expects programs to be written in a language similar to OpenQASM 2.0. These programs must be piped into QAnsel as standard input and the simulation results will be displayed as standard output. Below is an example using a here document.
$ ./QAnsel << EOF
> qreg q[2];
> creg c[2];
> h q[0];
> cx q[0], q[1];
> measure q[0] -> c[0];
> measure q[1] -> c[1];
> sample c;
> EOF
00: 50.7%
01: 0.0%
10: 0.0%
11: 49.3%
Please use the -? flag to see a help document.
Special Hardware
To enable a hardware random number generator, the -r
flag must be used. This flag will select the hardware
random number generator based on an order of precedence.
The order is as follows.
- Quantis-PCIe-40M
- TrueRNG V3
- Intel Secure Key Technology
To enable GPU acceleration, the -oX flag has to be
set replacing X with an optimization level equal to
4 or greater.
It is recommended that you run a simple program with the
-v flag which will produce output stating which hardware
devices were actually found and enabled.
QAnsel can handle up to 16 qubits, however, qubit counts greater than 14 will not fit into most consumer-end GPUs. It is recommended to stick to a maximum of 14 qubits. This is compatible with GPU acceleration with mearly 3 GB of VRAM.