The PennyLane-Lightning plugin provides a fast state-vector simulator written in C++ using Eigen.
PennyLane is a cross-platform Python library for quantum machine learning, automatic differentiation, and optimization of hybrid quantum-classical computations.
- Combine PennyLane-Lightning's high performance simulator with PennyLane's automatic differentiation and optimization.
PennyLane-Lightning requires Python version 3.6 and above. It can be installed using pip
:
$ pip install pennylane-lightning
Alternatively, to build PennyLane-Lightning from source you can run
$ git clone https://github.com/XanaduAI/pennylane-lightning.git
$ cd pennylane-lightning
$ pip install -e .
Note that subsequent calls to pip install -e .
will use cached binaries stored in the
build
folder. Run make clean
if you would like to recompile.
The following dependencies are required to install PennyLane-Lightning:
- A C++ compiler, such as
g++
,clang
, orMSVC
. - Eigen3 - a C++ header library for linear algebra.
- pybind11 a library for binding C++ functionality to Python.
On Debian-based systems, these can be installed via apt
and pip
:
$ sudo apt install g++ libeigen3-dev
$ pip install pybind11
To test that the plugin is working correctly you can test the Python code within the cloned repository:
$ make test
while the C++ code can be tested with
$ make test-cpp
Testing the C++ code requires the GoogleTest framework.
Please refer to the plugin documentation as well as to the PennyLane documentation for further reference.
We welcome contributions - simply fork the repository of this plugin, and then make a pull request containing your contribution. All contributers to this plugin will be listed as authors on the releases.
We also encourage bug reports, suggestions for new features and enhancements, and even links to cool projects or applications built on PennyLane.
PennyLane-Lightning is the work of many contributors.
If you are doing research using PennyLane and PennyLane-Lightning, please cite our paper:
Ville Bergholm, Josh Izaac, Maria Schuld, Christian Gogolin, M. Sohaib Alam, Shahnawaz Ahmed, Juan Miguel Arrazola, Carsten Blank, Alain Delgado, Soran Jahangiri, Keri McKiernan, Johannes Jakob Meyer, Zeyue Niu, Antal Száva, and Nathan Killoran. PennyLane: Automatic differentiation of hybrid quantum-classical computations. 2018. arXiv:1811.04968
- Source Code: https://github.com/PennyLaneAI/pennylane-lightning
- Issue Tracker: https://github.com/PennyLaneAI/pennylane-lightning/issues
- PennyLane Forum: https://discuss.pennylane.ai
If you are having issues, please let us know by posting the issue on our Github issue tracker, or by asking a question in the forum.
The PennyLane lightning plugin is free and open source, released under the Apache License, Version 2.0.