PennyLane
Install
Install
  1. Compilation/
  2. Pauli Product Rotations

Pauli Product Rotations

OverviewParametrized gatesStatic gates

Parametrized gates

We list typical parametrized gates with their PPR decomposition. The cost of a gate is critically dependent on its angle, making it impractical to assign a fixed cost. To actually determine the cost, floating point angles need to be discretized and transformed to the (Clifford + T) gate set.

OperatorPPRComment
PauliRote^{-i \frac{\phi}{2} P}note the factor -\frac{1}{2} in the exponent
RZe^{-i \frac{\phi}{2} Z}same logic for RX and RY
PhaseShifte^{i \frac{\phi}{2}}e^{-i \frac{\phi}{2} Z}
ControlledPhaseShifte^{i \frac{\phi}{4}}e^{-i \frac{\phi}{4} Z_0} e^{-i \frac{\phi}{4} Z_1} e^{i \frac{\phi}{4} Z_0 Z_1}
CRXe^{i \frac{\phi}{4} Z_0 X_1} e^{-i \frac{\phi}{4} X_1}
CRYe^{i \frac{\phi}{4} Z_0 Y_1} e^{-i \frac{\phi}{4} Y_1}
CRZe^{i \frac{\phi}{4} Z_0 Z_1}e^{-i \frac{\phi}{4} Z_1}
PSWAPe^{-i (\frac{\pi}{4} - \frac{\phi}{2})} e^{i (\frac{\pi}{4} - \frac{\phi}{2}) Z_0 Z_1} e^{-i \frac{\pi}{4} X_0 X_1} e^{-i \frac{\pi}{4} Y_0 Y_1}Note that the XX and YY coefficients are static
SingleExcitatione^{i \frac{\phi}{4}( XY - YX)}Givens rotation, all generators commute
DoubleExcitatione^{i \frac{\phi}{2^4}(XXXY + XXYX - XYXX + XYYY - YXXX + YXYY - YYXY - YYYX)}all generators commute

MultiControlledPhaseShift

Let us denote a controlled PhaseShift gate with multiple controls as a MultiControlledPhaseShift, or, C_{1, 2, .., n-1}(R_\phi). In code, this can be realized as

qp.ctrl(qp.PhaseShift(phi, wires=[n]), control=range(1, n))

For n=3 qubits, the PPR decomposition takes the following form:

C_{1, 2}(R_\phi) = e^{i \frac{\phi}{8}} e^{-i \frac{\phi}{8} (Z_1 + Z_2 + Z_3)} e^{i \frac{\phi}{8} (Z_1 Z_2 + Z_2 Z_3 + Z_1 Z_3)} e^{-i \frac{\phi}{8} (Z_1 Z_2 Z_3)}.

Note that we collected generators with the same Pauli weight in a single exponent for the sake of brevity. Formally, this can be written as

C_{1, 2, .., n-1}(R_\phi) = \prod_{\ell=0}^n e^{i (-1)^\ell \frac{\phi}{2^n} P_Z(\ell, n)}.

where P_Z(\ell, n) is the sum of all possible pure Z Pauli words with Pauli weight \ell on n qubits. We define P_Z(0, n) as the identity, so this PPR term is just a global phase.

This can alternatively be understood in code:

import pennylane as qp
from itertools import combinations
def MultiControlledPhaseShift(phi, n):
    qp.exp(1j * phi/(2**n) * I(range(n)))
    for i in range(1, n+1):
        for ops in combinations([Z(jj) for jj in range(n)], i):
            qp.exp(1j * (-1)**i * phi/(2**n) * qp.prod(*ops))

And can be easily verified:

from functools import partial
import numpy as np
n = 4

phis = np.linspace(0, np.pi, 50)
U_decomp = qp.matrix(MultiControlledPhaseShift, wire_order=range(n))

@partial(qp.matrix, wire_order=range(n))
def U(phi, n):
    qp.ctrl(qp.PhaseShift(phi, wires=[n-1]), control=range(n-1))

all(np.allclose(U_decomp(phi, n), U(phi, n)) for phi in phis)
# True

PCPhase

The PCPhase gate can be decomposed into individual MultiControlledPhaseShift operations, as detailed here. So together with the above decomposition of MultiControlledPhaseShift, we can decompose any PCPhase gate into PPRs.

Never miss a milestone

Get the latest quantum updates delivered to your inbox.

Join the list
PennyLane

PennyLane is an open-source quantum software platform for quantum computing, quantum machine learning, and quantum chemistry. Create meaningful quantum algorithms, from inspiration to implementation.

Created with ❤️ by Xanadu.

Research

  • Research

  • Performance

  • Hardware and simulators

  • Demos library

  • Compilation hub

  • Quantum datasets

Education

  • Teach

  • Learn

  • Codebook

  • Coding challenges

  • Videos

  • Glossary

Software

  • Install

  • Features

  • PennyLane documentation

  • Catalyst documentation

  • Development guide

  • How-to guides

  • API

  • GitHub


Xanadu

© Copyright 2026 | Xanadu | All rights reserved

TensorFlow, the TensorFlow logo and any related marks are trademarks of Google Inc.

Privacy policyTerms of serviceCookies policyCode of conduct