Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

Implement catalytic controlled-Hadamard

Open ncrubin opened this issue 1 year ago • 5 comments

https://journals.aps.org/prxquantum/pdf/10.1103/PRXQuantum.2.030305

Fig 17.

ncrubin avatar May 23 '23 21:05 ncrubin

Screenshot 2023-10-31 at 2 30 44 PM

fdmalone avatar Oct 31 '23 21:10 fdmalone

@mpharrigan / @tanujkhattar what are your thoughts on adding a ControlledHadamard Bloq, which possibly delays the above implementation and just tags the cost? It would be nice to have this bloq to add more colour to the first quantized (and second quantized) decompositions. I know there is some discussion in #134 on how to do this generally, so wanted to check first.

An alternative would be to decompose via cirq and generalize appropriately.

fdmalone avatar Oct 31 '23 21:10 fdmalone

I'd be fine with that. I think since this is a special decomposition for the controlled version of an ordinary bloq it doesn't conflict with #134 which deigns to automatically decompose ControlledBloq(bloq) as [ControlledBloq(sb) for sb in bloq.decompose_bloq()]

mpharrigan avatar Nov 01 '23 00:11 mpharrigan

Did this ever get contributed?

mpharrigan avatar May 01 '24 18:05 mpharrigan

AFAIK, no

tanujkhattar avatar May 01 '24 19:05 tanujkhattar

I'll add a specific CHadamard bloq but leave it as a leaf bloq #873 and the existing cirq-based magic circuit and the explicit construction can be captured in methods, and the desired resource-counting behavior can be configured via the QECGatesCost cost-key

mpharrigan avatar Jul 03 '24 18:07 mpharrigan