Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

`bloq_is_clifford` treats `MultiTargetCNOT` as a single clifford gate

Open anurudhp opened this issue 1 year ago • 4 comments

https://github.com/quantumlib/Qualtran/blob/683472a25a1bafb64fd5e5c58f79405737a4afd4/qualtran/resource_counting/classify_bloqs.py#L140

Is this the expected behaviour due to some possibly optimized implementation?

@tanujkhattar @mpharrigan

anurudhp avatar Aug 20 '24 22:08 anurudhp

instead of $n$ cliffords?

The notion of clifford counting is pretty poorly defined. In the surface code, you can do a multi-target cnot in 1 step (d cycles) -- the same speed as any other single clifford gate

mpharrigan avatar Aug 21 '24 00:08 mpharrigan

Ah! I think we should document this in the code clearly.

anurudhp avatar Aug 21 '24 00:08 anurudhp

The old t complexity code counts all the constituent CNOTs. Since it has a decomposition (isn't an atomic/leaf bloq) maybe we should keep counting them. However: there's no support for symbolic bitsize, which causes tests to fail. This bloq could probably do with a re-write to make it more readable and including a build_call_graph

mpharrigan avatar Aug 28 '24 17:08 mpharrigan

This is an example where I think we would benefit from counting things in terms of qubits * surface code cycles, as advocated in #1454.

wjhuggins avatar Oct 09 '24 17:10 wjhuggins