Releases: PennyLaneAI/pennylane-lightning
Release v0.31.0
New features since last release
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)
whenPython_EXECUTABLE
was removed fromsetup.py
. (#461) -
Ensure aligned allocator definition works with C++20 compilers. (#438)
-
Prevent multiple threads from calling
Kokkos::initialize
orKokkos::finalize
. (#439)
Contributors
This release contains contributions from (in alphabetical order):
Vincent Michaud-Rioux, Lee J. O'Riordan, Chae-Yeun Park
Release v0.30.0
New features since last release
-
Add MCMC sampler.
(#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 PennyLaneqml.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 v0.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 variableLLVM_ROOT_DIR
(or fallback tobrew
). (#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)
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
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 v0.27.0
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)
Improvements
-
Update clang-tools version in Github workflows. (#351)
-
Improve tests and checks CI/CD pipelines. (#353)
-
Implement 3 Qubit gates (CSWAP & Toffoli) & 4 Qubit gates (DoubleExcitation, DoubleExcitationMinus, DoubleExcitationPlus) using (low-memory) LM architecture. (#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)
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 v0.26.1
Release 0.26.1
Bug fixes
- Fixes the transposition method used in the probability calculation.
(#377)
Contributor
Amintor Dusko
Release v0.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
,
andSProd
by deferring handling of them toDefaultQubit
. (#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