PennyLane
Install
Install
  1. Compilation/
  2. Select-U(2) Decomposition

Select-U(2) Decomposition

OverviewDetailsResources

Widely-used building blocks in quantum algorithms are Select-applied U(2) operators, i.e. multiplexers with a single target qubit. These apply a different operator to the target qubit for each computational basis state of the control qubits, which is commonly visualized like this:

Select-applied, or multiplexed, single qubit operator

An important special case is that of uniformly controlled Pauli rotations, for which each applied operator is a rotation by a different angle but about the same axis (Pauli X, Y or Z). It is implemented as qml.SelectPauliRot in PennyLane and represented as:

Multiplexed, or uniformly controlled, Pauli rotation

Note that there are also more generic optimization techniques for Select operators with multiple target qubits, like unary iteration, partial Select or lazy Select. Alternatively, multiplexed Pauli rotations can be implemented approximately, with fewer non-Clifford gates but additional qubits, using a phase gradient resource state.

Inputs

  • Select-applied, or multiplexed, single-qubit operator, or, as a special case,
  • Select-applied, or multiplexed, Pauli rotation.

Outputs

  • Decomposed circuit for the multiplexer.

Example

For a multiplexed Pauli Z rotation, Shende et al. [1] and Möttönen et al. [2] show the following decomposition, displayed exemplarily for k=3 control qubits:

0: ─╭◻──┤ =  ──────────────────────╭●──────────────────────╭●─┤
1: ─├◻──┤    ──────────╭●──────────│───────────╭●──────────│──┤
2: ─├◻──┤    ────╭●────│─────╭●────│─────╭●────│─────╭●────│──┤
3: ─╰RZ─┤    ─RZ─╰X─RZ─╰X─RZ─╰X─RZ─╰X─RZ─╰X─RZ─╰X─RZ─╰X─RZ─╰X─┤,

which uses 2^k CNOT gates and single-qubit rotations each. The same decomposition applies for R_Y rotations, simply by replacing the single-qubit rotations accordingly. For R_X rotations, the entangling gates have to be replaced as well, for example, by CZ gates.

For Select-U(2) operators, Bergholm et al. [3] present the following decomposition, again shown for k=3:

0: ─╭◻─┤ =  ──────────────────────╭●──────────────────────────────╭RZ─┤
1: ─├◻─┤    ──────────╭●──────────│───────────╭●──────────────╭RZ─├◻──┤
2: ─├◻─┤    ────╭●────│─────╭●────│─────╭●────│─────╭●────╭RZ─├◻──├◻──┤
3: ─╰U─┤    ─U0─╰X─U2─╰X─U2─╰X─U3─╰X─U4─╰X─U5─╰X─U6─╰X─U7─╰◻──╰◻──╰◻──┤,

where the trailing multiplexed R_Z rotations are decomposed with the rule from above, and resemble the decomposition of a diagonal unitary operator. Overall, this decomposition uses 3(2^k -1) CNOT gates.

Typical usage

This decomposition allows to break down multiplexers of arbitrary size into one- and two-qubit operators in order to arrive at hardware-compatible circuit instructions. Therefore, it is part of a key step towards lower-level representations of a quantum algorithm.

An important related routine is Mottonen state preparation [2], implemented as MottonenStatePreparation in PennyLane.

References

[1] "Synthesis of quantum-logic circuits", Vivek V. Shende, Stephen S. Bullock, Igor L. Markov, quant-ph/0406176, 2004.

[2] "Transformation of quantum states using uniformly controlled rotations", Mikko Möttönen, Juha J Vartiainen, Ville Bergholm, Martti M Salomaa, quant-ph/0407010, 2004.

[3] "Quantum circuits with uniformly controlled one-qubit gates", Ville Bergholm, Juha J Vartiainen, Mikko Möttönen, Martti M Salomaa, quant-ph/0410066, 2004.

Cite this page

@misc{PennyLane-SelectU2Decomp,
    title = "Select-U(2) Decomposition",
    author = "David Wierichs",
    year = "2025",
    howpublished = "\url{https://pennylane.ai/compilation/select-u2-decomp}"
}

Page author(s)

David Wierichs
David Wierichs

David Wierichs

I like to think about differentiation and representations of quantum programs, and I enjoy coding up research ideas and useful features for anyone to use in PennyLane.

PennyLane

PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Built by researchers, for research. Created with ❤️ by Xanadu.

Research

  • Research
  • Performance
  • Hardware & Simulators
  • Demos
  • Quantum Compilation
  • Quantum Datasets

Education

  • Teach
  • Learn
  • Codebook
  • Coding Challenges
  • Videos
  • Glossary

Software

  • Install PennyLane
  • Features
  • Documentation
  • Catalyst Compilation Docs
  • Development Guide
  • API
  • GitHub
Stay updated with our newsletter

© Copyright 2025 | Xanadu | All rights reserved

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

Privacy Policy|Terms of Service|Cookie Policy|Code of Conduct