Skip to content

test: Emulation test for modifier resolver#1293

Draft
hkengo-qtnm wants to merge 13 commits intomainfrom
test/modifier-emulation
Draft

test: Emulation test for modifier resolver#1293
hkengo-qtnm wants to merge 13 commits intomainfrom
test/modifier-emulation

Conversation

@hkengo-qtnm
Copy link
Contributor

This rough draft PR proposes one example idea to test the compiler pass for modifiers. This PR doesn't need to be merged soon.

It is very difficult to test implementation of compiler pass for modifiers. Especially because the implementation of modifier resolver in tket::modifier::modifier_resolver::tket_op_modify is huge, and also the output Hugr can easily become quite huge depending on the number of control qubits. We should have some testing method for them. Now that since qis-compiler is merged to TKET2 repo, it might be possible to run tests in TKET, however, I believe writing circuits in guppy syntax and check them using numpy(or sympy) in python is probably the simplest approach.

I have implemented two small examples to check the semantics of control and dagger modifiers. This is not enough, but should be better than nothing.

Base automatically changed from feat/modifier-unitarity_checker to main November 4, 2025 13:12
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.

1 participant