Skip to content

Why is the CZ-gate given Clifford index 4368? #733

@Wikstahl

Description

@Wikstahl

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 gates

For idx = 4368, we obtain:

  • idx_0 = 0
  • idx_1 = 14
  • idx_2 = 1
  • idx_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 additional Y90 before)

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions