You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A dictionary whose keys are some subset of the keys (which are gate names) `nonstd_gate_unitaries` and the
strings (which are gate names) in `gate_names` and whose values are lists of qubit-label-tuples. Each
qubit-label-tuple must have length equal to the number of qubits the corresponding gate acts upon, and
causes that gate to be available to act on the specified qubits. Instead of a list of tuples, values of
`availability` may take the special values `"all-permutations"` and `"all-combinations"`, which as their
names imply, equate to all possible permutations and combinations of the appropriate number of qubit labels
(deterined by the gate's dimension). If a gate name is not present in `availability`, the default is
`"all-permutations"`. So, the availability of a gate only needs to be specified when it cannot act in every
valid way on the qubits (e.g., the device does not have all-to-all connectivity).
The relevant substring in the docstring is
If a gate name is not present in `availability`, the default is `"all-permutations"`. So, the availability of a gate
only needs to be specified when it cannot act in every valid way on the qubits (e.g., the device does not have
all-to-all connectivity).
I'm not sure what the actual behavior is, but I've given code below which shows that the behavior is different from the docstring.
To Reproduce
importnumpyasnpimportpygstiaspgfrompygsti.processorsimportQuditProcessorSpecfrompygsti.modelsimportcreate_explicit_modelimportscipygate_names=['Gxpi2', 'Gypi2']
Uxpi2=np.asarray(np.bmat([[scipy.linalg.expm(-1j/2*np.pi/2*pg.sigmax),np.zeros((2,1))],
[np.zeros((1,2)),np.array([[1]])]]))
Uypi2=np.asarray(np.bmat([[scipy.linalg.expm(-1j/2*np.pi/2*pg.sigmay),np.zeros((2,1))],
[np.zeros((1,2)),np.array([[1]])]]))
qps=QuditProcessorSpec(
qudit_labels=[0],
qudit_udims=[3],
gate_names=['Gxpi2', 'Gypi2'],
nonstd_gate_unitaries={'Gxpi2':Uxpi2,'Gypi2':Uypi2}
#,availability={'Gxpi2':[0], 'Gypi2':[0]}
)
# the next line errors if (and only if) you keep the "availability" keyword arg commented outmodel=create_explicit_model(qps, ideal_spam_type='full pure', ideal_gate_type='full TP', basis='gm')
Expected behavior
The behavior described in the docstring.
The text was updated successfully, but these errors were encountered:
@rileyjmurray What version of pyGSTi were you running this on? I'm trying to reproduce on current develop and failing to do so (both commenting/uncommenting the availability line succeed).
Describe the bug
The docstring for QuditProcessorSpec has a mistake for the "availability" keyword argument. The existing code is ...
pyGSTi/pygsti/processors/processorspec.py
Lines 85 to 94 in 2d4fe84
The relevant substring in the docstring is
I'm not sure what the actual behavior is, but I've given code below which shows that the behavior is different from the docstring.
To Reproduce
Expected behavior
The behavior described in the docstring.
The text was updated successfully, but these errors were encountered: