Skip to content

Litinski transform (based on Rustiq) #14753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alexanderivrii
Copy link
Member

Summary

Implements the Litinski transform as a Qiskit transformation pass, as requested in #14657.

The input to the pass is a circuit with Clifford and single-qubit RZ-rotation gates, and the output is a circuit with multi-qubit Pauli rotations (implemented as PauliEvolutionGate gates) followed by Clifford gates. (Note that by returning the Clifford gates rather than the Clifford operator we preserve the global phase of the circuit).

Currently the set of supported Clifford gates is ["cx", "cz", "h", "s", "sdg", "sx", "sxdg", "x", "y", "z"] and the set of supported RZ-rotations is ["t", "tdg", "rz"] (we automatically convert T and Tdg gates to RZ-rotations, note that this changes the global phase of the circuit).

Details and comments

This is a joint work with @Cryoris. The implementation calls Simon Martiel's Rustiq code, a package that is already used in Qiskit for synthesizing Pauli Evolution gates. In parallel, @ShellyGarion is working on a native Qiskit rust implementation of Pauli and Clifford classes (see #14677), that will allow to replace the call to Rustiq by a Qiskit-native implementation. The reason for this is that longer-term we need to be able to extend/adjust the implementation and it would be nice to have the flexibility to do this directly in Qiskit.

ToDo:

  • support parametric RZ-rotations
  • release notes
  • support for barriers?
  • convert special-angle RZ-gates to Clifford gates?

@alexanderivrii alexanderivrii added this to the 2.2.0 milestone Jul 17, 2025
@alexanderivrii alexanderivrii requested a review from a team as a code owner July 17, 2025 12:44
@alexanderivrii alexanderivrii added the Changelog: New Feature Include in the "Added" section of the changelog label Jul 17, 2025
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @Qiskit/terra-core

@ShellyGarion ShellyGarion added mod: transpiler Issues and PRs related to Transpiler fault tolerance related to fault tolerance compilation labels Jul 17, 2025
@coveralls
Copy link

coveralls commented Jul 17, 2025

Pull Request Test Coverage Report for Build 16354607606

Details

  • 107 of 117 (91.45%) changed or added relevant lines in 6 files are covered.
  • 7 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.01%) to 87.779%

Changes Missing Coverage Covered Lines Changed/Added Lines %
qiskit/transpiler/passes/optimization/litinski_transformation.py 7 8 87.5%
crates/transpiler/src/passes/litinski_transformation.rs 96 105 91.43%
Files with Coverage Reduction New Missed Lines %
crates/circuit/src/symbol_expr.rs 1 73.98%
crates/qasm2/src/expr.rs 1 93.63%
crates/qasm2/src/lex.rs 5 92.27%
Totals Coverage Status
Change from base Build 16327707788: 0.01%
Covered Lines: 81590
Relevant Lines: 92949

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog fault tolerance related to fault tolerance compilation mod: transpiler Issues and PRs related to Transpiler
Projects
Status: To do
Development

Successfully merging this pull request may close these issues.

4 participants