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

Add more gate definitions for sdk integration #82

Merged
merged 2 commits into from
Nov 15, 2024
Merged

Conversation

TheGupta2012
Copy link
Member

@TheGupta2012 TheGupta2012 commented Nov 15, 2024

Summary of changes

This pull request includes several changes to the pyqasm/maps.py file, mainly focusing on adding new gate implementations and updating existing ones.

New Gate Implementations:

  • Added the iswap_gate function to implement the iSwap gate as a decomposition of other gates.
  • Added the cu_gate function to implement the CU gate, and updated the cu3_gate function to use u3_gate for decomposition.
  • Added the cu1_gate function to implement the CU1 gate as a decomposition of other gates.
  • Added the cphaseshift_gate function to implement the controlled phase shift gate using u3_gate for decomposition.

Removed/Updated Gate Implementations:

  • Removed the xx_gate function and replaced its usage with rxx_gate in the gate map. [1] [2]
  • Updated the cu3_gate function to use u3_gate instead of phaseshift_gate for decomposition.

Test Updates:

  • Added _check_iswap_gate_op function to test the iswap_gate implementation.
  • Updated the check_two_qubit_gate_op function to include the iswap gate.
  • Migrated tests from tests.passes.test_qasm3_format.py

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 35.29412% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pyqasm/maps.py 35.29% 22 Missing ⚠️

📢 Thoughts on this report? Let us know!

@TheGupta2012 TheGupta2012 merged commit 3a7a0fa into main Nov 15, 2024
6 checks passed
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