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
{{ message }}
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.
When using the marginal_counts() function in qiskit.ignis.verification.marginal_counts() with default meas_qubits=True, then the function raises a TypeError here.
>>> marginal_counts(counts)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/rwoo/rwoo/lib/python3.6/site-packages/qiskit/ignis/verification/tomography/data.py", line 60, in marginal_counts
if num_qubits == len(meas_qubits) or (meas_qubits is True):
TypeError: object of type 'bool' has no len()
What is the expected behavior?
marginal_counts() returns all of the counts trimmed of any whitespace.
Suggested solutions
Reorder the if condition to check that meas_qubits == True before trying to do list operations on it.
The text was updated successfully, but these errors were encountered:
Informations
What is the current behavior?
When using the
marginal_counts()
function inqiskit.ignis.verification.marginal_counts()
with defaultmeas_qubits=True
, then the function raises a TypeError here.https://github.com/Qiskit/qiskit-ignis/blob/master/qiskit/ignis/verification/tomography/data.py#L60
Steps to reproduce the problem
What is the expected behavior?
marginal_counts()
returns all of the counts trimmed of any whitespace.Suggested solutions
Reorder the if condition to check that
meas_qubits == True
before trying to do list operations on it.The text was updated successfully, but these errors were encountered: