Skip to content

Latest commit

 

History

History
134 lines (91 loc) · 5.81 KB

changelog-dev.md

File metadata and controls

134 lines (91 loc) · 5.81 KB

:orphan:

Release 0.40.0-dev (development release)

New features since last release

  • A DeviceCapabilities data class is defined to contain all capabilities of the device's execution interface (i.e. its implementation of Device.execute). A TOML file can be used to define the capabilities of a device, and it can be loaded into a DeviceCapabilities object. (#6407)

    >>> from pennylane.devices.capabilities import load_toml_file, parse_toml_document, DeviceCapabilities
    >>> document = load_toml_file("my_device.toml")
    >>> capabilities = parse_toml_document(document)
    >>> isinstance(capabilities, DeviceCapabilities)
    True

New API for Qubit Mixed

  • Added qml.devices.qubit_mixed module for mixed-state qubit device support (#6379). This module introduces an apply_operation helper function that features:

    • Two density matrix contraction methods using einsum and tensordot

    • Optimized handling of special cases including: Diagonal operators, Identity operators, CX (controlled-X), Multi-controlled X gates, Grover operators

  • Added submodule 'initialize_state' featuring a create_initial_state function for initializing a density matrix from qml.StatePrep operations or qml.QubitDensityMatrix operations. (#6503)

Improvements 🛠

  • Added support for the wire_options dictionary to customize wire line formatting in qml.draw_mpl circuit visualizations, allowing global and per-wire customization with options like color, linestyle, and linewidth. (#6486)

  • Shortened the string representation for the qml.S, qml.T, and qml.SX operators. (#6542)

Capturing and representing hybrid programs

  • jax.vmap can be captured with qml.capture.make_plxpr and is compatible with quantum circuits. (#6349)

  • qml.capture.PlxprInterpreter base class has been added for easy transformation and execution of pennylane variant jaxpr. (#6141)

Other Improvements

  • qml.BasisRotation template is now JIT compatible. (#6019)

  • The Jaxpr primitives for for_loop, while_loop and cond now store slices instead of numbers of args. (#6521)

  • Expand ExecutionConfig.gradient_method to store TransformDispatcher type. (#6455)

Breaking changes 💔

  • Top level access to Device, QubitDevice, and QutritDevice have been removed. Instead, they are available as qml.devices.LegacyDevice, qml.devices.QubitDevice, and qml.devices.QutritDevice respectively. (#6537)

  • The 'ancilla' argument for qml.iterative_qpe has been removed. Instead, use the 'aux_wire' argument. (#6532)

  • The qml.BasisStatePreparation template has been removed. Instead, use qml.BasisState. (#6528)

  • The qml.workflow.set_shots helper function has been removed. We no longer interact with the legacy device interface in our code. Instead, shots should be specified on the tape, and the device should use these shots. (#6534)

  • QNode.gradient_fn has been removed. Please use QNode.diff_method instead. QNode.get_gradient_fn can also be used to process the diff method. (#6535)

  • qml.broadcast has been removed. Users should use for loops instead. (#6527)

  • The max_expansion argument for qml.transforms.clifford_t_decomposition has been removed. (#6531)

  • The expand_depth argument for qml.compile has been removed. (#6531)

  • The qml.shadows.shadow_expval transform has been removed. Instead, please use the qml.shadow_expval measurement process. (#6530) (#6561)

Deprecations 👋

  • The QNode.get_best_method and QNode.best_method_str methods have been deprecated. Instead, use the qml.workflow.get_best_diff_method function. (#6418)

  • The qml.execute gradient_fn keyword argument has been renamed diff_method, to better align with the termionology used by the QNode. gradient_fn will be removed in v0.41. (#6549)

Documentation 📝

* Add reporting of test warnings as failures. [(#6217)](#6217)
  • Add a warning message to Gradients and training documentation about ComplexWarnings (#6543)

Bug fixes 🐛

  • qml.math.get_deep_interface now works properly for autograd arrays. (#6557)

  • Fixed Identity.__repr__ to return correct wires list. (#6506)

Contributors ✍️

This release contains contributions from (in alphabetical order):

Shiwen An, Astral Cai, Yushao Chen, Pietropaolo Frisoni, Austin Huang, Christina Lee, Andrija Paurevic, Justin Pickering