Skip to content

Adding PhasedQubitSparsePauli and PhasedQubitSparsePauliList #14759

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

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

DanPuzzuoli
Copy link
Contributor

Summary

This PR adds PhasedQubitSparsePauli and PhasedQubitSparsePauliList. These classes are very similar in motivation/functionality as QubitSparsePauli and QubitSparsePauliList (which are phase-less), but for the case where we want to store the phases of the Paulis.

The phases in PhasedQubitSparsePauli and PhasedQubitSparsePauliList will be stored in the same format as Pauli:

  • Internally the ZX-phase is stored, but the phase attribute will return the "group phase". E.g. Pauli("Y")._phase == 1 (as Y = ((-i)^1)ZX, whereas Pauli("Y").phase == 0.

Details and comments

At this stage, the PR is setting up some basic functionality for PhasedQubitSparsePauli, and defines an extremely minimal PhasedQubitSparsePauliList.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 16377058382

Details

  • 191 of 448 (42.63%) changed or added relevant lines in 3 files are covered.
  • 15 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.2%) to 87.543%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/quantum_info/src/pauli_lindblad_map/phased_qubit_sparse_pauli.rs 160 417 38.37%
Files with Coverage Reduction New Missed Lines %
crates/circuit/src/symbol_expr.rs 3 73.73%
crates/qasm2/src/lex.rs 6 91.75%
crates/qasm2/src/parse.rs 6 97.09%
Totals Coverage Status
Change from base Build 16327707788: -0.2%
Covered Lines: 81644
Relevant Lines: 93262

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants