Skip to content

Comments

Add reverse_qubit_order to QasmModule#60

Merged
TheGupta2012 merged 3 commits intomainfrom
reverse-qubit-order
Nov 5, 2024
Merged

Add reverse_qubit_order to QasmModule#60
TheGupta2012 merged 3 commits intomainfrom
reverse-qubit-order

Conversation

@TheGupta2012
Copy link
Member

@TheGupta2012 TheGupta2012 commented Nov 5, 2024

Fixes #56

Summary of changes

Documentation updates:

  • docs/index.rst: Updated the example to use the pyqasm.load method instead of pyqasm.unroll and adjusted the variable names accordingly.
  • examples/unroll_example.py: Updated the script description to reflect the use of pyqasm instead of pyqasm.unroll.
  • examples/validate_example.py: Updated the script description to reflect the use of pyqasm instead of pyqasm.validate.

Code enhancements:

  • pyqasm/analyzer.py: Added the get_op_bit_list method to retrieve the list of qubits associated with an operation. [1] [2]
  • pyqasm/modules.py: Refactored the _remap_qubits method to use the new Qasm3Analyzer.get_op_bit_list method and implemented the reverse_qubit_order method to support in-place reversal and return a new module if requested. [1] [2] [3]

Testing:

@codecov-commenter
Copy link

codecov-commenter commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@TheGupta2012 TheGupta2012 merged commit 3a7fa5c into main Nov 5, 2024
@TheGupta2012 TheGupta2012 deleted the reverse-qubit-order branch November 14, 2024 06:28
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.

[FEATURE] Migrate reverse_qubit_order from qBraid SDK

2 participants