Skip to content

Files

Latest commit

 

History

History

docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

PennyLane and the Lightning plugins

PennyLane is an open-source software framework for quantum machine learning, quantum chemistry, and quantum computing, with the ability to run on all hardware. Maintained with ❤️ by Xanadu.

Documentation

For more information on PennyLane, including the demos, APIs and development guide, visit the PennyLane documentation site. You can also check the Lightning-plugins documentation:

Download & install

Each image contains PennyLane and one of several high-performance plugins. Choose a version (e.g. v0.34.0) and append a device (plugin) name among the following:

If you have Docker installed, download and spawn a container with pennylane-lightning as follows

docker run -v pwd:/io -it pennylaneai/pennylane:v0.34.0-lightning-qubit bash

On certain systems, there may be other solutions supporting Docker containers. For instance, NERSC computers (e.g. Perlmutter) have Shifter bringing containers to HPC. In this case, spawning a container is simple as

shifterimg pull pennylaneai/pennylane:v0.34.0-lightning-qubit
shifter --image=pennylaneai/pennylane:v0.34.0-lightning-qubit /bin/bash

where the first command downloads the image and the second spawns a container.

Test

You can test PennyLane and the lightning-qubit plugin, for example, with

pip install pytest pytest-mock flaky
pl-device-test --device default.qubit
pl-device-test --device default.qubit --shots 10000
pl-device-test --device lightning.qubit
pl-device-test --device lightning.qubit --shots 10000

Build

Decide on a target among:

  • wheel-lightning-qubit
  • wheel-lightning-gpu
  • wheel-lightning-kokkos-cuda
  • wheel-lightning-kokkos-openmp
  • wheel-lightning-kokkos-rocm

For instance TARGET=wheel-lightning-qubit. Then the following command will build the target

docker build -f docker/Dockerfile --tag=${TARGET} --target ${TARGET} .

You may also feed a git tag or version as follows

docker build -f docker/Dockerfile --tag=${TARGET} --target ${TARGET} --build-arg="LIGHTNING_VERSION=${VERSION}" .

To start a container with a bash shell use

docker run -v `pwd`:/io -it ${TARGET} bash