Closed WrathfulSpatula closed 4 months ago
See the PR https://github.com/vm6502q/qrack/pull/874, for background.
Hey @WrathfulSpatula is this still open
@Vikrant-Khedkar It is! Another participant seemed interested, but they haven't followed up. Regardless, the bounty is up-for-grabs!
Commenting to link #1009 with this.
Thank you, @jpacold!
There's an obvious extension of
ZMask()
to "masked"S
,T
, and generalPhaseRootN
gates.ZMask()
calculates parity of each masked permutation, and applies a-1
multiplicative factor if the parity is odd, achieving a batched set of masked PauliZ
gates. Similarly, for a general batchedPhaseRootN
gate, the effective extension of this parity calculation is to a ring with2^(n+1)
phase poles for then
-th root of-1
, for a phase factor. (I can explain this in simpler terms, if a volunteer developer wants clarification.)QEngine
types could therefore be generally extended to arbitraryPhaseRootN
gate fusion and batching, (along with PauliX
, which it already has). I don't think I'm going to personally take up this implementation immediately, but I might look at it by the weekend.