Skip to content

Added gate decomposition documentation.#237

Closed
vinayswamik wants to merge 10 commits intoqBraid:mainfrom
vinayswamik:docs/update
Closed

Added gate decomposition documentation.#237
vinayswamik wants to merge 10 commits intoqBraid:mainfrom
vinayswamik:docs/update

Conversation

@vinayswamik
Copy link
Copy Markdown
Collaborator

@vinayswamik vinayswamik commented Jul 26, 2025

Summary of changes

  • Extracted all gate decomposition diagrams and explanations from src/pyqasm/maps/gates.py into docs/gate_decompositions.md.
  • Updated gates.py to reference the relevant section in the Markdown documentation using direct GitHub URLs for each gate decomposition.
  • Updated README.md to reference the new gate decompositions documentation.
  • Ensured all navigation between code and documentation is clear and works in GitHub and standard Markdown previewers.

Closes #190

@vinayswamik vinayswamik requested review from TheGupta2012 and removed request for TheGupta2012 July 26, 2025 07:59
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 26, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/pyqasm/maps/gates.py 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Member

@TheGupta2012 TheGupta2012 left a comment

Choose a reason for hiding this comment

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

Changes look good @vinayswamik! On a second glance through the maps, I see that we are missing some decompositions. Can you add the Qiskit decompositions for them in the gate_decompositions.md file as well and the back links in maps.py? This is the missing gate list -

[ u3, cy, zz, cswap, pswap, iswap, rxx, rccx, cphaseshift[00, 10, 01], ecr]

@TheGupta2012
Copy link
Copy Markdown
Member

TheGupta2012 commented Jul 28, 2025

I'm still seeing the empty logo @vinayswamik with your file but if I add a new qBraid logo , it appears in the docs. Can you figure out why that's happening?

@vinayswamik
Copy link
Copy Markdown
Collaborator Author

vinayswamik commented Jul 28, 2025

Changes look good @vinayswamik! On a second glance through the maps, I see that we are missing some decompositions. Can you add the Qiskit decompositions for them in the gate_decompositions.md file as well and the back links in maps.py? This is the missing gate list -

[ u3, cy, zz, cswap, pswap, iswap, rxx, rccx, cphaseshift[00, 10, 01], ecr]

do you mean gates.py. i didn't see any maps.py file in pyqasm. or do you want me to create new file...?.

And also, some of these gate decompositions are seems different in qiskit as per my observation.

@vinayswamik vinayswamik requested a review from TheGupta2012 July 28, 2025 23:19
@vinayswamik vinayswamik changed the title update logo and added gate decomposition documentation. Added gate decomposition documentation. Jul 29, 2025
@TheGupta2012
Copy link
Copy Markdown
Member

Changes look good @vinayswamik! On a second glance through the maps, I see that we are missing some decompositions. Can you add the Qiskit decompositions for them in the gate_decompositions.md file as well and the back links in maps.py? This is the missing gate list -
[ u3, cy, zz, cswap, pswap, iswap, rxx, rccx, cphaseshift[00, 10, 01], ecr]

do you mean gates.py. i didn't see any maps.py file in pyqasm. or do you want me to create new file...?.

And also, some of these gate decompositions are seems different in qiskit as per my observation.

Sorry for that confusion, I meant the gates.py file. As for the decompositions absent in Qiskit, some of them might have been taken from the basis gate sets of IQM and Rigetti Devices

@TheGupta2012
Copy link
Copy Markdown
Member

TheGupta2012 commented Jul 29, 2025

Can you also see why the CI tests are failing?

Edit : turns out it was a 503 server error , re-running the jobs fixed it

Comment thread docs/gate_decompositions.md
Comment thread docs/gate_decompositions.md Outdated

## [CPhaseShift00 Gate](../src/pyqasm/maps/gates.py#L568)

The controlled phase shift 00 gate is implemented using the following qiskit decomposition:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Add decompositions for 00, 01, 10

@TheGupta2012
Copy link
Copy Markdown
Member

Hi @vinayswamik , changes lgtm. Once you add the decompositions for the above mentioned 4 gates, can merge

@vinayswamik vinayswamik requested a review from TheGupta2012 July 30, 2025 21:17
@github-actions
Copy link
Copy Markdown
Contributor

🚫 Logo Change Blocked

Changes to docs/_static/logo.png are not allowed in pull requests.

Why is this blocked?

  • The logo is a protected asset that should only be updated by repository maintainers
  • This helps maintain brand consistency and prevents unauthorized logo changes

What should you do?

  • Remove the logo.png changes from this PR
  • If you need to update the logo, please contact the repository maintainers directly

Files changed in this PR:

Unable to retrieve changed files

@github-actions
Copy link
Copy Markdown
Contributor

🚫 Logo Change Blocked

Changes to docs/_static/logo.png are not allowed in pull requests.

Why is this blocked?

  • The logo is a protected asset that should only be updated by repository maintainers
  • This helps maintain brand consistency and prevents unauthorized logo changes

What should you do?

  • Remove the logo.png changes from this PR
  • If you need to update the logo, please contact the repository maintainers directly

Files changed in this PR:

Unable to retrieve changed files

@github-actions
Copy link
Copy Markdown
Contributor

🚫 Logo Change Blocked

Changes to docs/_static/logo.png are not allowed in pull requests.

Why is this blocked?

  • The logo is a protected asset that should only be updated by repository maintainers
  • This helps maintain brand consistency and prevents unauthorized logo changes

What should you do?

  • Remove the logo.png changes from this PR
  • If you need to update the logo, please contact the repository maintainers directly

Files changed in this PR:

Unable to retrieve changed files

@github-actions
Copy link
Copy Markdown
Contributor

🚫 Logo Change Blocked

Changes to docs/_static/logo.png are not allowed in pull requests.

Why is this blocked?

  • The logo is a protected asset that should only be updated by repository maintainers
  • This helps maintain brand consistency and prevents unauthorized logo changes

What should you do?

  • Remove the logo.png changes from this PR
  • If you need to update the logo, please contact the repository maintainers directly

Files changed in this PR:

Unable to retrieve changed files

@TheGupta2012 TheGupta2012 mentioned this pull request Sep 11, 2025
@TheGupta2012
Copy link
Copy Markdown
Member

Closing as #266 is merged

@vinayswamik vinayswamik deleted the docs/update branch September 12, 2025 17:05
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.

Move Gate Decomposition Figures to Markdown Documentation

3 participants