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
richrines1 opened this issue
Jun 3, 2024
· 0 comments
· May be fixed by #6632
Labels
kind/bug-reportSomething doesn't seem to work.triage/acceptedthere is consensus amongst maintainers that this is a real bug or a reasonable feature to add
cirq.approx_eq(cirq.depolarize(0.1), cirq.X) # AttributeError: '_PauliX' object has no attribute 'p'cirq.approx_eq(cirq.phase_damp(0.1), cirq.X) # AttributeError: '_PauliX' object has no attribute '_gamma'cirq.approx_eq(cirq.phase_flip(0.1), cirq.X) # AttributeError: '_PauliX' object has no attribute '_p'cirq.approx_eq(cirq.bit_flip(0.1), cirq.X) # AttributeError: '_PauliX' object has no attribute '_p'cirq.approx_eq(cirq.asymmetric_depolarize(0.1), cirq.X) # AttributeError: '_PauliX' object has no attribute 'error_probabilities'assertcirq.depolarize(0.1, 1) ==cirq.depolarize(0.1, 2) # passes, but shouldn't
i believe the first issue would be fixed by just adding approximate=True to the @value_equality decorator for each class and removing their explicit implementations of _approx_eq_. The second issue just requires the inclusion of n_qubits in DepolarizingChannel._value_equality_values_
Cirq version
1.4.0.dev20240529202703
The text was updated successfully, but these errors were encountered:
NoureldinYosri
added
triage/accepted
there is consensus amongst maintainers that this is a real bug or a reasonable feature to add
and removed
triage/discuss
Needs decision / discussion, bring these up during Cirq Cynque
labels
Jun 12, 2024
kind/bug-reportSomething doesn't seem to work.triage/acceptedthere is consensus amongst maintainers that this is a real bug or a reasonable feature to add
Description of the issue
two related bugs related to equality checks for noise channels:
DepolarizingChannel.n_qubits
How to reproduce the issue
i believe the first issue would be fixed by just adding
approximate=True
to the@value_equality
decorator for each class and removing their explicit implementations of_approx_eq_
. The second issue just requires the inclusion ofn_qubits
inDepolarizingChannel._value_equality_values_
Cirq version
The text was updated successfully, but these errors were encountered: