PennyLane, from Xanau leading quantum computing software company, has released new features and improvements to its platform. The updates include support for just-in-time compilation workflows with the Qrack GPU simulator, allowing for faster execution speeds and dynamic quantum control flow. Additionally, PennyLane now supports arbitrary state-based measurements with qml.Snapshot and has updated its implementation of qml.assert_equal for various operator instances.
The company also announced improvements to its Catalyst compiler, including support for autodifferentiation and custom VJP rules. Furthermore, PennyLane’s QChem Hamiltonians can now be converted to and from OpenFermion with qml.to_openfermion and qml.from_openfermion.
These new features were developed in conjunction with UnitaryHACK 2024, a hackathon event. Key companies involved in this work include PennyLane, Harvard, and Qrack.
New Features
- Arbitrary state-based measurements: The
default.cliffordmodule now supports arbitrary state-based measurements withqml.Snapshot. - Updated implementation for
qml.assert_equal: The implementation has been updated for various operator instances, includingOperator,Controlled,Adjoint,Pow,Exp,SProd,ControlledSequence,Prod,Sum,Tensor, andHamiltonian. - Enhanced
qml.from_qasmfunctionality: It now supports converting mid-circuit measurements from OpenQASM 2 code and takes an optional argument to specify a list of measurements to be performed at the end of the circuit. - New operator:
qml.QutritChannel: This allows for specifying noise on thedefault.qutrit.mixeddevice using a collection of (3×3) Kraus matrices.
Improvements
- Efficient gradient computation with
catalyst.value_and_grad: Returns both the result of a function and its gradient with a single forward and backward pass, reducing overall quantum executions. - Dynamic one-shot method for simulating circuits with mid-circuit measurements: Catalyst now supports this method, which can be advantageous for circuits with many mid-circuit measurements executed for few shots.
- AutoGraph enhancements:
- Single-index in-place array assignments are now captured and automatically converted into JAX-compatible form.
- The
catalyst.disable_autographdecorator allows disabling AutoGraph for specific external functions. - Arrays with dynamic shapes can be used with control-flow primitives like
for_loop,while_loop, andcond.
- QChem Hamiltonians conversion: QChem Hamiltonians can now be converted to and from OpenFermion using
qml.to_openfermionandqml.from_openfermion. - QROM algorithm availability: The QROM algorithm is now available in PennyLane with
qml.QROM, allowing for entering classical data in the form of bitstrings.
Deprecations and Breaking Changes
- Simplify argument deprecation: The
simplifyargument inqml.Hamiltonianandqml.ops.LinearCombinationhas been deprecated; useqml.simplifyinstead. - Default behavior change for
qml.from_qasm(): The default behavior of removing measurements in the QASM code has been deprecated; usemeasurements=[]to keep this behavior ormeasurements=Noneto keep the measurements from the QASM code. - Removal of
qml.loadandqml.from_qasm_file: These functions have been removed in favor of more specific functions.
These updates demonstrate the continued growth and development of PennyLane and Catalyst, making them even more powerful tools for quantum computing and machine learning research.
External Link: Click Here For More
