Skip to content

[CQT-478] Correct the matrix representation of SqrtSWAP - #713

Merged
SoufiTNO merged 2 commits into
developfrom
CQT-478-correct-sqrtswap-in-opensquirrel
Sep 15, 2026
Merged

SoufiTNO merged 2 commits into
developfrom
CQT-478-correct-sqrtswap-in-opensquirrel

Conversation

@SoufiTNO

Copy link
Copy Markdown
Contributor

Corrects the SqrtSWAP matrix to match the updated cQASM spec. InvSqrtSWAP already matched and is unchanged.
Added tests for the identities the gate names imply, SqrtSWAP² = SWAP, the two gates being inverses, plus the same checks for SqrtISWAP, CV and DCNOT.

@SoufiTNO
SoufiTNO requested a review from elenbaasc September 15, 2026 09:40
@SoufiTNO SoufiTNO self-assigned this Sep 15, 2026
@SoufiTNO
SoufiTNO marked this pull request as ready for review September 15, 2026 09:46

@elenbaasc elenbaasc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for making the changes!

Just a few minor comments 🙂

Comment thread tests/ir/test_two_qubit_gate.py Outdated
Comment thread tests/ir/test_two_qubit_gate.py Outdated
Comment thread tests/ir/test_two_qubit_gate.py Outdated
@SoufiTNO

Copy link
Copy Markdown
Contributor Author

Thanks Chris, all three done :)

@elenbaasc elenbaasc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Perfect, thanks!

@SoufiTNO
SoufiTNO merged commit 057dbdc into develop Sep 15, 2026
16 checks passed
@SoufiTNO
SoufiTNO deleted the CQT-478-correct-sqrtswap-in-opensquirrel branch September 15, 2026 13:04
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