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

294 continue xp algebra #304

Merged
merged 14 commits into from
Feb 21, 2023
Merged

Conversation

ruihao-li
Copy link
Collaborator

Summary

PR for Issue #294. It includes implementation of several XP algebra methods in BaseXPPauli, XPPauli, and XPPauliList classes. See details below.

Details and comments

Functionality implemented (XP* are function names from Mark's code, name in brackets is the new name):

  • XPInverse (inverse)
  • XPConjugate (conjugate)
  • XPCommutator (commutator)
  • XPFundamentalPhase (fundamental_phase)
  • XPSetEval (reset_eigenvalue)

Furthermore, the power method is modified such that now XP operators in an XPPauliList object can be raised to different powers.

Corresponding unittests are added to test_xp_pauli.py and test_xp_pauli_list.py.

@ruihao-li ruihao-li added the QAMP label Dec 6, 2022
@ruihao-li ruihao-li requested review from dsvandet and a user December 6, 2022 17:52
@ruihao-li ruihao-li self-assigned this Dec 6, 2022
@ruihao-li ruihao-li linked an issue Dec 6, 2022 that may be closed by this pull request
qiskit_qec/operators/base_xp_pauli.py Show resolved Hide resolved
qiskit_qec/operators/base_xp_pauli.py Outdated Show resolved Hide resolved
qiskit_qec/operators/xp_pauli_list.py Outdated Show resolved Hide resolved
qiskit_qec/operators/base_xp_pauli.py Outdated Show resolved Hide resolved
qiskit_qec/operators/xp_pauli_list.py Outdated Show resolved Hide resolved
The `power` method now accepts int, list, or np.ndarray as input. If an int is provided, all XP operators in an XPPauliList would be raised to the same power.
@dsvandet dsvandet merged commit 4b0577c into Issue-257/XP_Formalism Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Continue implementing XP Algebra
3 participants