Expose joint rotations publicly, update test infrastructure - #1117
Conversation
| } | ||
| adjoint self; | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
(nit)
A thought crawls into my mind: May be in the future, instead of using Uncontrolled and Controlled it makes sense to use <Nothing> and Controlled? E.g. instead of using
ApplyUncontrolledX and ApplyControlledX to use
ApplyX and ApplyControlledX.
There was a problem hiding this comment.
Yeah, that's a good point, and I've been debating doing a broader rename of the files too. My initial thinking was to use "Uncontrolled" to make explicit the fact that the operation did not support the Controlled functor, but now it just seems unnecessary and wordy. I think a broader rename could be a follow up PR.
Robin Kuzmin (kuzminrobin)
left a comment
There was a problem hiding this comment.
Approving (with some doc-comment notes) to unblock. But I would recommend at least one more approval from those who understand quantum computing, e.g. César Zaragoza Cortés (@cesarzc).
|
Converting to draft until we are ready to proceed with this change. |
|
/azp where |
|
Azure DevOps orgs getting events for this repository: |
This change adds the two qubit joint rotations to the public API surface for Q# as
Rxx,Ryy, andRzz. They are decomposed on the simulator as before in terms ofExp, and decomposed on hardware targets via single qubit rotations. The exception is the Type1 target package, which is updated to decompose all gate operations in terms ofRx,Rz, andRzzas hardware-native intrinsics. These new Type1 decompositions are tested in a scoped test project.In addition, the scale of existing tests is reduced to improve test performance. Instead of verifying every Q# operation up to 8 controls (which has a high simulation cost), it picks a number of controls sufficient to exercise all code paths in the decomposition. This showed local perf gains that pushed tests from taking 5 minutes end-to-end to just over 1 second end-to-end.
Resolves #1000.