Skip to content

Latest commit

 

History

History
1277 lines (800 loc) · 45.3 KB

CHANGELOG.md

File metadata and controls

1277 lines (800 loc) · 45.3 KB

Release 0.34.0-dev

New features since last release

  • Add shots support for expectation value calculation for the observables (NamedObs, TensorProd and Hamiltonian) based on Pauli words, Identity and Hadamard in the C++ layer. All Lightning backends have this support now. (#556)

  • qml.QubitUnitary operators can be included in a circuit differentiated with the adjoint method. Lightning handles circuits with arbitrary non-differentiable qml.QubitUnitary operators. 1,2-qubit qml.QubitUnitary operators with differentiable parameters can be differentiated using decomposition. [(#540)] (#540)

Breaking changes

  • Overload applyOperation with a fifth matrix argument to all state vector classes to support arbitrary operations in AdjointJacobianBase. [(#540)] (#540)

Improvements

  • Modify setup.py to use backend-specific build directory (f"build_{backend}") to accelerate rebuilding backends in alternance. [(#540)] (#540)

  • Update Dockerfile and rewrite the build-wheel-lightning-gpu stage to build Lightning-GPU from the pennylane-lightning monorepo. [(#539)] (#539)

  • Add the MPI test CI workflows of Lightning-GPU in compatibility cron jobs. [(#536)] (#536)

  • Add MPI synchronization in places to safely handle communicated data. (#538)

  • Add release option in compatibility cron jobs to test the release candidates of PennyLane and the Lightning plugins against one another. [(#531)] (#531)

  • Add GPU workflows in compatibility cron jobs to test Lightning-GPU and Lightning-Kokkos with the Kokkos CUDA backend. [(#528)] (#528)

Documentation

Bug fixes

  • Move deprecated stateprep QuantumScript argument into the operation list in mpitests/test_adjoint_jacobian.py. [(#540)] (#540)

  • Fix MPI Python unit tests for the adjoint method. (#538)

Contributors

This release contains contributions from (in alphabetical order):

Vincent Michaud-Rioux, Shuli Shu


Release 0.33.1

  • pip-installed CUDA runtime libraries can now be accessed from a virtualenv. (#543)

Bug fixes

  • The pybind11 compiled module RPATH linkage has been restored to pre-0.33 behaviour. (#543)

Contributors

This release contains contributions from (in alphabetical order):

Lee J. O'Riordan


Release 0.33.0

New features since last release

  • Add documentation updates for the lightning.gpu backend. [(#525)] (#525)

  • Add SparseHamiltonian support for Lightning-Qubit and Lightning-GPU. [(#526)] (#526)

  • Add SparseHamiltonian support for Lightning-Kokkos. [(#527)] (#527)

  • Integrate python/pybind layer of distributed Lightning-GPU into the Lightning monorepo with python unit tests. [(#518)] (#518)

  • Integrate the distributed C++ backend of Lightning-GPU into the Lightning monorepo. [(#514)] (#514)

  • Integrate Lightning-GPU into the Lightning monorepo. The new backend is named lightning.gpu and includes all single-GPU features. [(#499)] (#499)

  • Build Linux wheels for Lightning-GPU (CUDA-11). (#517)

  • Add Dockerfile in docker and make docker workflow in Makefile. The Docker images and documentation are available on DockerHub. (#496)

  • Add mid-circuit state preparation operation tests. (#495)

Breaking changes

  • Add tests_gpu.yml workflow to test the Lightning-Kokkos backend with CUDA-12. (#494)

  • Implement LM::GeneratorDoubleExcitation, LM::GeneratorDoubleExcitationMinus, LM::GeneratorDoubleExcitationPlus kernels. Lightning-Qubit default kernels are now strictly from the LM implementation, which requires less memory and is faster for large state vectors. (#512)

  • Add workflows validating compatibility between PennyLane and Lightning's most recent stable releases and development (latest) versions. (#507) (#498)

  • Introduce timeout-minutes in various workflows, mainly to avoid Windows builds hanging for several hours. (#503)

  • Cast integral-valued arrays to the device's complex type on entry in _preprocess_state_vector to ensure the state is correctly represented with floating-point numbers. (#501)

  • Update DefaultQubit to DefaultQubitLegacy on Lightning fallback. (#500)

  • Enums defined in GateOperation.hpp start at 1 (previously 0). ::BEGIN is introduced in a few places where it was assumed 0 accordingly. (#485)

  • Enable pre-commit hooks to format all Python files and linting of all Python source files. (#485)

Improvements

  • Improve Python testing for Lightning-GPU (+MPI) by adding jobs in Actions files and adding Python tests to increase code coverage. (#522)

  • Add support for pip install pennylane-lightning[kokkos] for the OpenMP backend. (#515)

  • Update setup.py to allow for multi-package co-existence. The PennyLane_Lightning package now is the responsible for the core functionality, and will be depended upon by all other extensions. [(#504)] (#504)

  • Redesign Lightning-Kokkos StateVectorKokkos class to use Kokkos RangePolicy together with special functors in applyMultiQubitOp to apply 1- to 4-wire generic unitary gates. For more than 4 wires, the general implementation using Kokkos TeamPolicy is employed to yield the best all-around performance. [(#490)] (#490)

  • Redesign Lightning-Kokkos Measurements class to use Kokkos RangePolicy together with special functors to obtain the expectation value of 1- to 4-wire generic unitary gates. For more than 4 wires, the general implementation using Kokkos TeamPolicy is employed to yield the best all-around performance. [(#489)] (#489)

  • Add tests to increase Lightning-Kokkos coverage. (#485)

  • Add memory locality tag reporting and adjoint diff dispatch for lightning.qubit statevector classes. (#492)

  • Add support for dependent external packages to C++ core. (#482)

  • Add support for building multiple backend simulators. (#497)

Documentation

Bug fixes

  • Fix CI issues running python-cov with MPI. (#535)

  • Re-add support for pip install pennylane-lightning[gpu]. (#515)

  • Switch most Lightning-Qubit default kernels to LM. Add LM::multiQubitOp tests, failing when targeting out-of-order wires clustered close to num_qubits-1. Fix the LM::multiQubitOp kernel implementation by introducing a generic revWireParity routine and replacing the bitswap-based implementation. Mimic the changes fixing the corresponding multiQubitOp and expval functors in Lightning-Kokkos. (#511)

  • Fix RTD builds by removing unsupported system_packages configuration option. (#491)

Contributors

This release contains contributions from (in alphabetical order):

Ali Asadi, Amintor Dusko, Vincent Michaud-Rioux, Lee J. O'Riordan, Shuli Shu


Release 0.32.0

New features since last release

  • The lightning.kokkos backend supports Nvidia GPU execution (with Kokkos v4 and CUDA v12). (#477)

  • Complete overhaul of repository structure to facilitates integration of multiple backends. Refactoring efforts we directed to improve development performance, code reuse and decrease overall overhead to propagate changes through backends. New C++ modular build strategy allows for faster test builds restricted to a module. Update CI/CD actions concurrency strategy. Change minimal Python version to 3.9. [(#472)] (#472)

  • Wheels are built with native support for sparse Hamiltonians. [(#470)] (#470)

  • Add native support to sparse Hamiltonians in the absence of Kokkos & Kokkos-kernels. [(#465)] (#465)

Breaking changes

  • Rename QubitStateVector to StatePrep in the LightningQubit and LightningKokkos classes. (#486)

  • Modify adjointJacobian methods to accept a (maybe unused) reference StateVectorT, allowing device-backed simulators to directly access state vector data for adjoint differentiation instead of copying it back-and-forth into JacobianData (host memory). (#477)

Improvements

  • Refactor LKokkos Measurements class to use (fast) specialized functors whenever possible. [(#481)] (#481)

  • Merge Lightning Qubit and Lightning Kokkos backends in the new repository. [(#472)] (#472)

  • Integrated new unified docs for Lightning Kokkos and Lightning Qubit packages. [(#473)] (#473)

Documentation

Bug fixes

  • Ensure PennyLane has an active_return attribute before calling it. [(#483)] (#483)

  • Do no import sqrt2_v from <numbers> in Util.hpp to resolve issue with Lightning-GPU builds. (#479)

  • Update the CMake internal references to enable sub-project compilation with affecting the parent package. (#478)

  • apply no longer mutates the inputted list of operations. (#474)

Contributors

This release contains contributions from (in alphabetical order):

Amintor Dusko, Christina Lee, Vincent Michaud-Rioux, Lee J. O'Riordan


Release 0.31.0

New features since last release

  • Update Kokkos support to 4.0.01. [(#439)] (#439)

Breaking changes

  • Update tests to be compliant with PennyLane v0.31.0 development changes and deprecations. (#448)

Improvements

  • Remove logic from setup.py and transfer paths and env variable definitions into workflow files. (#450)

  • Detect MKL or CBLAS if ENABLE_BLAS=ON making sure that BLAS is linked as expected. (#449)

Documentation

  • Fix LightningQubit class parameter documentation. (#456)

Bug fixes

  • Ensure cross-platform wheels continue to build with updates in git safety checks. (#452)

  • Fixing Python version bug introduce in (#450) when Python_EXECUTABLE was removed from setup.py. (#461)

  • Ensure aligned allocator definition works with C++20 compilers. (#438)

  • Prevent multiple threads from calling Kokkos::initialize or Kokkos::finalize. (#439)

Contributors

This release contains contributions from (in alphabetical order):

Vincent Michaud-Rioux, Lee J. O'Riordan, Chae-Yeun Park


Release 0.30.0

New features since last release

  • Add MCMC sampler. [(#384)] (#384)

  • Serialize PennyLane's arithmetic operators when they are used as observables that are expressed in the Pauli basis. (#424)

Breaking changes

  • Lightning now works with the new return types specification that is now default in PennyLane. See the PennyLane qml.enable_return documentation for more information on this change. (#427)

Instead of creating potentially ragged numpy array, devices and QNode's now return an object of the same type as that returned by the quantum function.

>>> dev = qml.device('lightning.qubit', wires=1)
>>> @qml.qnode(dev, diff_method="adjoint")
... def circuit(x):
...     qml.RX(x, wires=0)
...     return qml.expval(qml.PauliY(0)), qml.expval(qml.PauliZ(0))
>>> x = qml.numpy.array(0.5)
>>> circuit(qml.numpy.array(0.5))
(array(-0.47942554), array(0.87758256))

Interfaces like Jax or Torch handle tuple outputs without issues:

>>> jax.jacobian(circuit)(jax.numpy.array(0.5))
(Array(-0.87758255, dtype=float32, weak_type=True),
Array(-0.47942555, dtype=float32, weak_type=True))

Autograd cannot differentiate an output tuple, so results must be converted to an array before use with qml.jacobian:

>>> qml.jacobian(lambda y: qml.numpy.array(circuit(y)))(x)
array([-0.87758256, -0.47942554])

Alternatively, the quantum function itself can return a numpy array of measurements:

>>> dev = qml.device('lightning.qubit', wires=1)
>>> @qml.qnode(dev, diff_method="adjoint")
>>> def circuit2(x):
...     qml.RX(x, wires=0)
...     return np.array([qml.expval(qml.PauliY(0)), qml.expval(qml.PauliZ(0))])
>>> qml.jacobian(circuit2)(np.array(0.5))
array([-0.87758256, -0.47942554])

Improvements

  • Remove deprecated set-output commands from workflow files. (#437)

  • Lightning wheels are now checked with twine check post-creation for PyPI compatibility. (#430)

  • Lightning has been made compatible with the change in return types specification. (#427)

  • Lightning is compatible with clang-tidy version 16. (#429)

Contributors

This release contains contributions from (in alphabetical order):

Christina Lee, Vincent Michaud-Rioux, Lee James O'Riordan, Chae-Yeun Park, Matthew Silverman


Release 0.29.0

Improvements

  • Remove runtime dependency on ninja build system. (#414)

  • Allow better integration and installation support with CMake targeted binary builds. (#403)

  • Remove explicit Numpy and Scipy requirements. (#412)

  • Get llvm installation root from the environment variable LLVM_ROOT_DIR (or fallback to brew). (#413)

  • Update AVX2/512 kernel infrastructure for additional gate/generator operations. (#404)

  • Remove unnecessary lines for resolving CodeCov issue. (#415)

  • Add more AVX2/512 gate operations. (#393)

Documentation

Bug fixes

  • Ensure error raised when asking for out of order marginal probabilities. Prevents the return of incorrect results. (#416)

  • Fix Github shields in README. (#402)

Contributors

Amintor Dusko, Vincent Michaud-Rioux, Lee James O'Riordan, Chae-Yeun Park


Release 0.28.2

Bug fixes

  • Fix Python module versioning for Linux wheels. (#408)

Contributors

This release contains contributions from (in alphabetical order):

Amintor Dusko, Shuli Shu, Trevor Vincent


Release 0.28.1

Bug fixes

  • Fix Pybind11 module versioning and locations for Windows wheels. (#400)

Contributors

This release contains contributions from (in alphabetical order):

Lee J. O'Riordan


Release 0.28.0

Breaking changes

  • Deprecate support for Python 3.7. (#391)

Improvements

  • Improve Lightning package structure for external use as a C++ library. (#369)

  • Improve the stopping condition method. (#386)

Bug fixes

  • Pin CMake to 3.24.x in wheel-builder to avoid Python not found error in CMake 3.25, when building wheels for PennyLane-Lightning-GPU. (#387)

Contributors

This release contains contributions from (in alphabetical order):

Amintor Dusko, Lee J. O'Riordan


Release 0.27.0

New features since last release

  • Enable building of python 3.11 wheels and upgrade python on CI/CD workflows to 3.8. (#381)

Breaking changes

Improvements

  • Update clang-tools version in Github workflows. (#351)

  • Improve tests and checks CI/CD pipelines. (#353)

  • Implement 3 Qubits gates (CSWAP & Toffoli) & 4 Qubits gates (DoubleExcitation, DoubleExcitationMinus, DoubleExcitationPlus) in LM manner. (#362)

  • Upgrade Kokkos and Kokkos Kernels to 3.7.00, and improve sparse matrix-vector multiplication performance and memory usage. (#361)

  • Update Linux (ubuntu-latest) architecture x86_64 wheel-builder from GCC 10.x to GCC 11.x. (#373)

  • Update gcc and g++ 10.x to 11.x in CI tests. This update brings improved support for newer C++ features. (#370)

  • Change Lightning to inherit from QubitDevice instead of DefaultQubit. (#365)

Documentation

Bug fixes

  • Use mutex when accessing cache in KernelMap. (#382)

Contributors

This release contains contributions from (in alphabetical order):

Amintor Dusko, Chae-Yeun Park, Monit Sharma, Shuli Shu


Release 0.26.1

Bug fixes

  • Fixes the transposition method used in the probability calculation. (#377)

Contributor

Amintor Dusko


Release 0.26.0

Improvements

  • Introduces requirements-dev.txt and improves dockerfile. (#330)

  • Support expval for a Hamiltonian. (#333)

  • Implements caching for Kokkos installation. (#316)

  • Supports measurements of operator arithmetic classes such as Sum, Prod, and SProd by deferring handling of them to DefaultQubit. (#349)

@qml.qnode(qml.device('lightning.qubit', wires=2))
def circuit():
    obs = qml.s_prod(2.1, qml.PauliZ(0)) + qml.op_sum(qml.PauliX(0), qml.PauliZ(1))
    return qml.expval(obs)

Bug fixes

  • Test updates to reflect new measurement error messages. (#334)

  • Updates to the release tagger to fix incompatibilities with RTD. (#344)

  • Update cancel-workflow-action and bot credentials. (#345)

Contributors

This release contains contributions from (in alphabetical order):

Amintor Dusko, Christina Lee, Lee J. O'Riordan, Chae-Yeun Park


Release 0.25.0

New features since last release

Breaking changes

  • We explicitly disable support for PennyLane's parameter broadcasting. #317

  • We explicitly remove support for PennyLane's Sum, SProd and Prod as observables. (#326)

Improvements

  • CI builders use a reduced set of resources and redundant tests for PRs. (#319)

  • Parallelize wheel-builds where applicable. (#314)

  • AVX2/512 kernels are now available on Linux/MacOS with x86-64 architecture. (#313)

Documentation

  • Updated ReadTheDocs runner version from Ubuntu 20.04 to 22.04 (#327)

Bug fixes

  • Test updates to reflect new additions to PennyLane. (#318)

Contributors

This release contains contributions from (in alphabetical order):

Amintor Dusko, Christina Lee, Rashid N H M, Lee J. O'Riordan, Chae-Yeun Park


Release 0.24.0

New features since last release

  • Add SingleExcitation and DoubleExcitation qchem gates and generators. (#289)

  • Add a new dispatch mechanism for future kernels. (#291)

  • Add IsingXY gate operation. (#303)

  • Support qml.state() in vjp and Hamiltonian in adjoint jacobian. (#294)

Breaking changes

  • Codebase is now moving to C++20. The default compiler for Linux is now GCC10. (#295)

  • Minimum macOS version is changed to 10.15 (Catalina). (#295)

Improvements

  • Split matrix operations, refactor dispatch mechanisms, and add a benchmark suits. (#274)

  • Add native support for the calculation of sparse Hamiltonians' expectation values. Sparse operations are offloaded to Kokkos and Kokkos-Kernels. (#283)

  • Device lightning.qubit now accepts a datatype for a statevector. (#290)

dev1 = qml.device('lightning.qubit', wires=4, c_dtype=np.complex64) # for single precision
dev2 = qml.device('lightning.qubit', wires=4, c_dtype=np.complex128) # for double precision

Documentation

Bug fixes

  • Fix the issue with using available clang-format version in format. (#288)

  • Fix a bug in the generator of DoubleExcitationPlus. (#298)

Contributors

This release contains contributions from (in alphabetical order):

Mikhail Andrenkov, Ali Asadi, Amintor Dusko, Lee James O'Riordan, Chae-Yeun Park, and Shuli Shu


Release 0.23.0

New features since last release

  • Add generate_samples() to lightning. (#247)

  • Add Lightning GBenchmark Suite. (#249)

  • Support runtime and compile information. (#253)

Improvements

  • Add ENABLE_BLAS build to CI checks. (#249)

  • Add more clang-tidy checks and kernel tests. (#253)

  • Add C++ code coverage to CI. (#265)

  • Skip over identity operations in "lightning.qubit". (#268)

Bug fixes

  • Update tests to remove JacobianTape. (#260)

  • Fix tests for MSVC. (#264)

  • Fix #include <cpuid.h> for PPC and AArch64 in Linux. (#266)

  • Remove deprecated tape execution methods. (#270)

  • Update qml.probs in test_measures.py. (#280)

Contributors

This release contains contributions from (in alphabetical order):

Ali Asadi, Chae-Yeun Park, Lee James O'Riordan, and Trevor Vincent


Release 0.22.1

Bug fixes

  • Ensure Identity kernel is registered to C++ dispatcher. (#275)

Release 0.22.0

New features since last release

Improvements

  • Update quantum tapes serialization and Python tests. (#239)

  • Clang-tidy is now enabled for both tests and examples builds under Github Actions. (#237)

  • The return type of StateVectorBase data is now derived-class defined. (#237)

  • Update adjointJacobian and VJP methods. (#222)

  • Set GitHub workflow to upload wheels to Test PyPI. (#220)

  • Finalize the new kernel implementation. (#212)

Documentation

  • Use of batching with OpenMP threads is documented. (#221)

Bug fixes

  • Fix for OOM errors when using adjoint with large numbers of observables. (#221)

  • Add virtual destructor to C++ state-vector classes. (#200)

  • Fix a bug in Python tests with operations' matrix calls. (#238)

  • Refactor utility header and fix a bug in linear algebra function with CBLAS. (#228)

Contributors

This release contains contributions from (in alphabetical order):

Ali Asadi, Chae-Yeun Park, Lee James O'Riordan


Release 0.21.0

New features since last release

  • Add C++ only benchmark for a given list of gates. (#199)

  • Wheel-build support for Python 3.10. (#186)

  • C++ support for probability, expectation value and variance calculations. (#185)

  • Add bindings to C++ expval, var, probs. (#214)

Improvements

  • setup.py adds debug only when --debug is given (#208)

  • Add new highly-performant C++ kernels for quantum gates. (#202)

The new kernels significantly improve the runtime performance of PennyLane-Lightning for both differentiable and non-differentiable workflows. Here is an example workflow using the adjoint differentiation method with a circuit of 5 strongly entangling layers:

import pennylane as qml
from pennylane import numpy as np
from pennylane.templates.layers import StronglyEntanglingLayers
from numpy.random import random
np.random.seed(42)
n_layers = 5
n_wires = 6
dev = qml.device("lightning.qubit", wires=n_wires)

@qml.qnode(dev, diff_method="adjoint")
def circuit(weights):
    StronglyEntanglingLayers(weights, wires=list(range(n_wires)))
    return [qml.expval(qml.PauliZ(i)) for i in range(n_wires)]

init_weights = np.random.random(StronglyEntanglingLayers.shape(n_layers=n_layers, n_wires=n_wires))
params = np.array(init_weights,requires_grad=True)
jac = qml.jacobian(circuit)(params)

The latest release shows improved performance on both single and multi-threaded evaluations!

  • Ensure debug info is built into dynamic libraries. (#201)

Documentation

  • New guidelines on adding and benchmarking C++ kernels. (#202)

Bug fixes

  • Update clang-format version (#219)

  • Fix failed tests on Windows. (#218)

  • Update clang-format version (#219)

  • Add virtual destructor to C++ state-vector classes. (#200)

  • Fix failed tests for the non-binary wheel. (#213)

  • Add virtual destructor to C++ state-vector classes. (#200)

Contributors

This release contains contributions from (in alphabetical order):

Ali Asadi, Amintor Dusko, Chae-Yeun Park, Lee James O'Riordan


Release 0.20.1

Bug fixes

  • Fix missing header-files causing build errors in algorithms module. (#193)

  • Fix failed tests for the non-binary wheel. (#191)


Release 0.20.2

Bug fixes

  • Introduce CY kernel to Lightning to avoid issues with decomposition. (#203)

Contributors

This release contains contributions from (in alphabetical order):

Lee J. O'Riordan

Release 0.20.1

Bug fixes

  • Fix missing header-files causing build errors in algorithms module. (#193)

  • Fix failed tests for the non-binary wheel. (#191)

Release 0.20.0

New features since last release

  • Add wheel-builder support for Python 3.10. (#186)

  • Add VJP support to PL-Lightning. (#181)

  • Add complex64 support in PL-Lightning. (#177)

  • Added examples folder containing aggregate gate performance test. (#165)

Breaking changes

Improvements

  • Update PL-Lightning to support new features in PL. (#179)

Documentation

  • Lightning setup.py build process uses CMake. (#176)

Contributors

This release contains contributions from (in alphabetical order):

Ali Asadi, Chae-Yeun Park, Isidor Schoch, Lee James O'Riordan


Release 0.19.0

  • Add Cache-Friendly DOTC, GEMV, GEMM along with BLAS Support. (#155)

Improvements

  • The performance of parametric gates has been improved. (#157)

  • AVX support is enabled for Linux users on Intel/AMD platforms. (#157)

  • PennyLane-Lightning has been updated to conform with clang-tidy recommendations for modernization, offering performance improvements across all use-cases. (#153)

Breaking changes

  • Linux users on x86_64 must have a CPU supporting AVX. (#157)

Bug fixes

  • OpenMP built with Intel MacOS CI runners causes failures on M1 Macs. OpenMP is currently disabled in the built wheels until this can be resolved with Github Actions runners. (#166)

Contributors

This release contains contributions from (in alphabetical order):

Ali Asadi, Lee James O'Riordan


Release 0.18.0

New features since last release

  • PennyLane-Lightning now provides a high-performance adjoint Jacobian method for differentiating quantum circuits. (#136)

    The adjoint method operates after a forward pass by iteratively applying inverse gates to scan backwards through the circuit. The method is already available in PennyLane's default.qubit device, but the version provided by lightning.qubit integrates with the C++ backend and is more performant, as shown in the plot below:

    The plot compares the average runtime of lightning.qubit and default.qubit for calculating the Jacobian of a circuit using the adjoint method for a range of qubit numbers. The circuit consists of ten BasicEntanglerLayers with a PauliZ expectation value calculated on each wire, repeated over ten runs. We see that lightning.qubit provides a speedup of around two to eight times, depending on the number of qubits.

    The adjoint method can be accessed using the standard interface. Consider the following circuit:

    import pennylane as qml
    
    wires = 3
    layers = 2
    dev = qml.device("lightning.qubit", wires=wires)
    
    @qml.qnode(dev, diff_method="adjoint")
    def circuit(weights):
        qml.templates.StronglyEntanglingLayers(weights, wires=range(wires))
        return qml.expval(qml.PauliZ(0))
    
    weights = qml.init.strong_ent_layers_normal(layers, wires, seed=1967)

    The circuit can be executed and its gradient calculated using:

    >>> print(f"Circuit evaluated: {circuit(weights)}")
    Circuit evaluated: 0.9801286266677633
    >>> print(f"Circuit gradient:\n{qml.grad(circuit)(weights)}")
    Circuit gradient:
    [[[-1.11022302e-16 -1.63051504e-01 -4.14810501e-04]
    [ 1.11022302e-16 -1.50136528e-04 -1.77922957e-04]
    [ 0.00000000e+00 -3.92874550e-02  8.14523075e-05]]
    
    [[-1.14472273e-04  3.85963953e-02  0.00000000e+00]
    [-5.76791765e-05 -9.78478343e-02  0.00000000e+00]
    [-5.55111512e-17  0.00000000e+00 -1.11022302e-16]]]
  • PennyLane-Lightning now supports all of the operations and observables of default.qubit. (#124)

Improvements

  • A new state-vector class StateVectorManaged was added, enabling memory use to be bound to statevector lifetime. (#136)

  • The repository now has a well-defined component hierarchy, allowing each indepedent unit to be compiled and linked separately. (#136)

  • PennyLane-Lightning can now be installed without compiling its C++ binaries and will fall back to using the default.qubit implementation. Skipping compilation is achieved by setting the SKIP_COMPILATION environment variable, e.g., Linux/MacOS: export SKIP_COMPILATION=True, Windows: set SKIP_COMPILATION=True. This feature is intended for building a pure-Python wheel of PennyLane-Lightning as a backup for platforms without a dedicated wheel. (#129)

  • The C++-backed Python bound methods can now be directly called with wires and supplied parameters. (#125)

  • Lightning supports arbitrary unitary and non-unitary gate-calls from Python to C++ layer. (#121)

Documentation

  • Added preliminary architecture diagram for package. (#131)

  • C++ API built as part of docs generation. (#131)

Breaking changes

  • Wheels for MacOS <= 10.13 will no longer be provided due to XCode SDK C++17 support requirements. (#149)

Bug fixes

  • An indexing error in the CRY gate is fixed. (#136)

  • Column-major data in numpy is now correctly converted to row-major upon pass to the C++ layer. (#126)

Contributors

This release contains contributions from (in alphabetical order):

Thomas Bromley, Lee James O'Riordan


Release 0.17.0

New features

  • C++ layer now supports float (32-bit) and double (64-bit) templated complex data. (#113)

Improvements

  • The PennyLane device test suite is now included in coverage reports. (#123)

  • Static versions of jQuery and Bootstrap are no longer included in the CSS theme. (#118)

  • C++ tests have been ported to use Catch2 framework. (#115)

  • Testing now exists for both float and double precision methods in C++ layer. (#113) (#115)

  • Compile-time utility methods with constexpr have been added. (#113)

  • Wheel-build support for ARM64 (Linux and MacOS) and PowerPC (Linux) added. (#110)

  • Add support for Controlled Phase Gate (ControlledPhaseShift). (#114)

  • Move changelog to .github and add a changelog reminder. (#111)

  • Adds CMake build system support. (#104)

Breaking changes

  • Removes support for Python 3.6 and adds support for Python 3.9. (#127) (#128)

  • Compilers with C++17 support are now required to build C++ module. (#113)

  • Gate classes have been removed with functionality added to StateVector class. (#113)

  • We are no longer building wheels for Python 3.6. (#106)

Bug fixes

  • PowerPC wheel-builder now successfully compiles modules. (#120)

Documentation

  • Added community guidelines. (#109)

Contributors

This release contains contributions from (in alphabetical order):

Ali Asadi, Christina Lee, Thomas Bromley, Lee James O'Riordan


Release 0.15.1

Bug fixes

  • The PennyLane-Lightning binaries are now built with NumPy 1.19.5, to avoid ABI compatibility issues with the latest NumPy 1.20 release. See the NumPy release notes for more details. (#97)

Contributors

This release contains contributions from (in alphabetical order):

Josh Izaac, Antal Száva


Release 0.15.0

Improvements

  • For compatibility with PennyLane v0.15, the analytic keyword argument has been removed. Statistics can still be computed analytically by setting shots=None. (#93)

  • Inverse gates are now supported. (#89)

  • Add new lightweight backend with performance improvements. (#57)

  • Remove the previous Eigen-based backend. (#67)

Bug fixes

  • Re-add dispatch table after fixing static initialisation order issue. (#68)

Contributors

This release contains contributions from (in alphabetical order):

Thomas Bromley, Theodor Isacsson, Christina Lee, Thomas Loke, Antal Száva.


Release 0.14.1

Bug fixes

  • Fixes a bug where the QNode would swap LightningQubit to DefaultQubitAutograd on device execution due to the inherited passthru_devices entry of the capabilities dictionary. (#61)

Contributors

This release contains contributions from (in alphabetical order):

Antal Száva


Release 0.14.0

Improvements

  • Extends support from 16 qubits to 50 qubits. (#52)

Bug fixes

  • Updates applying basis state preparations to correspond to the changes in DefaultQubit. (#55)

Contributors

This release contains contributions from (in alphabetical order):

Thomas Loke, Tom Bromley, Josh Izaac, Antal Száva


Release 0.12.0

Bug fixes

  • Updates capabilities dictionary to be compatible with core PennyLane (#45)

  • Fix install of Eigen for CI wheel building (#44)

Contributors

This release contains contributions from (in alphabetical order):

Tom Bromley, Josh Izaac, Antal Száva


Release 0.11.0

Initial release.

This release contains contributions from (in alphabetical order):

Tom Bromley, Josh Izaac, Nathan Killoran, Antal Száva