Qualtran icon indicating copy to clipboard operation
Qualtran copied to clipboard

Make `Identity` a bookkeeping bloq

Open anurudhp opened this issue 1 year ago • 1 comments

Fixes #1207

anurudhp avatar Aug 20 '24 23:08 anurudhp

Thanks. This does indeed solve the issue as posed, but I'm not sure it's exactly what we need. The C[I] is indeed equivalent to I on the second qubit and no operation on the control qubit-- but then again, I is equivalent to no operation on the qubit. The purpose (I'm making an educated guess) of an Identity bloq is to have control over the adjacency matrix of the compute graph without doing anything to the data. Currently, the I bloq is used in a list of bloqs to select from. You can imagine wanting to select from a list of $n$-qubit operations, and put the identity at some of the indices. You can imagine using a multi-qubit identity bloq to form a "barrier" in the circuit to time-align operations. If the answer to "why do we have an identity bloq" is indeed "to control the adjacency matrix of the compute graph without doing anything" then I think turning a two bit Identity operation into a one bit identity operation as done in this PR is not the exact right move.

Organizationally, I also think it belongs back where it was; alongside its pauli friends.

mpharrigan avatar Aug 21 '24 00:08 mpharrigan

closed in favor of #1327

anurudhp avatar Aug 21 '24 22:08 anurudhp