sandialabs / pyGSTi

A python implementation of Gate Set Tomography
http://www.pygsti.info
Apache License 2.0
137 stars 55 forks source link

Gswap cannot be used as a two-qubit standard native gate for two-qubit RB as CliffordCompilationRules taking too long #471

Open vsandinh opened 4 months ago

vsandinh commented 4 months ago

Describe the bug I tried to run RB-Overview.ipynb file but with small change in the native gate set. I used 'Gswap' which is one of the standard two-qubit gates in the documentation of QubitProcessorSpec class. However, it is taking forever to instantiate the CliffordCompilationRules class.

I also tried a custom two-qubit gate which is iSWAP, the program showed similar behavior

To Reproduce Here is the code:

from __future__ import print_function #python 2 & 3 compatibility
import pygsti
from pygsti.processors import QubitProcessorSpec as QPS
from pygsti.processors import CliffordCompilationRules as CCR

n_qubits = 2
qubit_labels = ['Q0','Q1'] 
gate_names = ['Gxpi2', 'Gxmpi2', 'Gypi2', 'Gympi2', 'Gswap'] 
availability = {'Gswap':[('Q0','Q1')]}
pspec = QPS(n_qubits, gate_names, availability=availability,
            qubit_labels=qubit_labels, )

compilations = {'absolute': CCR.create_standard(pspec, 'absolute', ('paulis', '1Qcliffords'), verbosity=0),            
                'paulieq': CCR.create_standard(pspec, 'paulieq', ('1Qcliffords', 'allcnots'), verbosity=0)}

Expected behavior CliffordCompilationRules should be instantiated.

Environment (please complete the following information):