SU(N) Multivariate Quantum Gates and Gradients
Overview
SU(N) Multivariate Quantum Gates and Gradients
This PennyLane demo, authored by David Wierichs, explores the SU(N) gate SpecialUnitary, a multivariate quantum gate that can represent any operation on its qubits by choosing its parameters, which are the coefficients of the su(N) Lie algebra in the Pauli basis. Rather than composing hardware-native single-qubit rotations and CNOTs into a general local operation, the tutorial uses this canonical group parameterization directly as an ansatz building block, arguing that it improves trainability. It derives and demonstrates a custom parameter-shift-style derivative rule for the SU(N) gate and compares it against finite differences and the stochastic parameter-shift rule for computing gradients. The demo then benchmarks a fabric of SpecialUnitary gates on a toy minimization problem against two other equally expressive general local gates, illustrating how the choice of parameterization affects optimization behavior even when expressivity is matched. The implementation leans on JAX for efficient differentiation and optimization. By showing that a mathematically natural, fully general local gate can be differentiated and trained effectively, the demo offers a fresh perspective on ansatz design for variational quantum algorithms and a concrete look at connecting Lie-algebraic structure to circuit construction.
Run it
pip install -r requirements.txt
python demo.py
Source and license
Imported from demonstrations_v2/tutorial_here_comes_the_sun/demo.py in PennyLaneAI/demos at c52c0abeb5122218aa96b38eea848864cce7323f, under the Apache License 2.0. Original authors: Xanadu and the PennyLane community. The upstream LICENSE is included alongside this example.
This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.
Versions
Cite all versions? Use the base QCR ID to always reference the latest version of this entry.
Join the Discussion
Comments (0)
No comments yet. Be the first to share your thoughts!