Skip to content
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

Improve speed of Pauli.to_label #13379

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Conversation

jakelishman
Copy link
Member

Summary

This uses Numpy vectorised operations and builtin Python tooling to remove Python-space loops from the Pauli label creation. This is a speed up of around 40x on my 2020 Intel MacBook Pro for most Paulis.

Details and comments

Fix #13355

This uses Numpy vectorised operations and builtin Python tooling to
remove Python-space loops from the Pauli label creation.  This is a
speed up of around 40x on my 2020 Intel MacBook Pro for most Paulis.
@jakelishman jakelishman added performance Changelog: New Feature Include in the "Added" section of the changelog mod: quantum info Related to the Quantum Info module (States & Operators) labels Oct 29, 2024
@jakelishman jakelishman requested a review from a team as a code owner October 29, 2024 17:49
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11579605700

Details

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • 24 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.02%) to 88.652%

Files with Coverage Reduction New Missed Lines %
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 2 58.05%
crates/qasm2/src/lex.rs 4 92.23%
qiskit/synthesis/two_qubit/xx_decompose/decomposer.py 6 90.77%
crates/qasm2/src/parse.rs 12 97.15%
Totals Coverage Status
Change from base Build 11579524174: -0.02%
Covered Lines: 75306
Relevant Lines: 84946

💛 - Coveralls

Copy link
Contributor

@Cryoris Cryoris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this improvement 🚀

@Cryoris Cryoris added this pull request to the merge queue Oct 30, 2024
Merged via the queue into Qiskit:main with commit b06c3cf Oct 30, 2024
16 checks passed
@jakelishman jakelishman deleted the pauli-label branch October 30, 2024 09:18
@raynelfss raynelfss added this to the 1.3.0 milestone Oct 30, 2024
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 mod: quantum info Related to the Quantum Info module (States & Operators) performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Faster hashing for Pauli operators.
5 participants