Add PhasedXZ Gate to Squin#722
Conversation
src/bloqade/cirq_utils/lowering.py
Outdated
| "IX", | ||
| "IY", | ||
| "IZ", | ||
| "IS", |
There was a problem hiding this comment.
Damn it, this happened to me a bunch of times: the typos hook does this.
Revert that change and please also add an exception for "IX", "IY", "IZ" in the tool config (in the pyproject.toml, I think).
There was a problem hiding this comment.
That's hilarious, thank you for letting me know! Will do.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
weinbe58
left a comment
There was a problem hiding this comment.
I think we should have some kind of integration test that runs a cirq circuit round trip through just to validate that things make sense.
| # optimizee to use a phaes x gate (r gate, rz gate) | ||
| # |
There was a problem hiding this comment.
could you do this before we merge the PR?
| x_exponent: ir.SSAValue = info.argument(types.Float) | ||
| z_exponent: ir.SSAValue = info.argument(types.Float) | ||
| axis_phase_exponent: ir.SSAValue = info.argument(types.Float) |
There was a problem hiding this comment.
Just to be clear Cirq uses half turns for the angles not full turns.
src/bloqade/cirq_utils/emit/gate.py
Outdated
| x_exponent = frame.get(stmt.x_exponent) | ||
| z_exponent = frame.get(stmt.z_exponent) | ||
| axis_phase_exponent = frame.get(stmt.axis_phase_exponent) |
There was a problem hiding this comment.
You should probably divide these by 2.
…t to ensure the phased xz preserves the state vector
…b-to-have-a-native-gate-operation-so-it-dispatches-directly-to-the-native-dialect
See issue #403