-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Hi!
Apologies for opening an issue, but I couldn’t find any contact details in the repository.
I’m currently using the Two-Qubit Clifford Interleaved Randomized Benchmarking feature with a CZ-gate as the interleaved gate. While looking through the code, I saw that the CZ-gate corresponds to Clifford index 4368:
Relevant Code in two_qubit_clifford_group.py
From the implementation of CNOT_like_gates(cls, idx), index 4368 falls into the class of CNOT-like Cliffords, and the corresponding decomposition is computed as follows:
@classmethod
def CNOT_like_gates(cls, idx):
"""
Returns the gates for Cliffords of the cnot like class
(q0) --C1--•--S1-- --C1--•--S1------
| -> |
(q1) --C1--⊕--S1-- --C1--•--S1^Y90--
"""
assert(idx < cls.GRP_SIZE_CNOT)
idx_0 = idx % 24
idx_1 = (idx // 24) % 24
idx_2 = (idx // 576) % 3
idx_3 = (idx // 1728)
C1_q0 = [(g, 'q0') for g in gate_decomposition[idx_0]]
C1_q1 = [(g, 'q1') for g in gate_decomposition[idx_1]]
CZ = [('CZ', ['q0', 'q1'])]
idx_2s = SingleQubitClifford._get_clifford_id(S1[idx_2])
S1_q0 = [(g, 'q0') for g in gate_decomposition[idx_2s]]
idx_3s = SingleQubitClifford._get_clifford_id(np.dot(C1[idx_3], Y90))
S1_yq1 = [(g, 'q1') for g in gate_decomposition[idx_3s]]
gates = C1_q0 + C1_q1 + CZ + S1_q0 + S1_yq1
return gatesFor idx = 4368, we obtain:
idx_0 = 0idx_1 = 14idx_2 = 1idx_3 = 2
Looking these up in clifford_group_single_qubit, we get the corresponding single-qubit decompositions:
C1_q0 -> [I, I, I]C1_q1 -> [I, H, S2]S1_q0 -> [I, I, S]S1_q1 -> [I, I, S2](with an additionalY90before)
Given the decomposition above, I don’t see how this results in a CZ-gate. My expectation was that the Clifford corresponding to index 4368 should directly implement a CZ operation, but the presence of Hadamard (H) and (S, S2) suggests additional single-qubit rotations are involved.
Could anyone please clarify the reasoning behind why this particular Clifford index is associated with a CZ-gate? Is there an implicit transformation I'm missing?
Many thanks!