Redundant implementations of phase damping channel #4578
Labels
area/channels
kind/bug-report
Something doesn't seem to work.
triage/accepted
A consensus emerged that this bug report, feature request, or other action should be worked on
Description of the issue
We currently have two implementations of the phase damping channel:
cirq.PhaseDampingChannel
andcirq.PhaseFlipChannel
. They implement the same channel, but use different parametrization. Also,PhaseDampingChannel
fails to provide_mixture_
(even though it is unital and hence admits a mixed-unitary representation).I propose to combine the two channel classes, but keep all existing factories. The constructor of the new class would have to support both parametrizations, but factory functions would each work with one (i.e. as it is presently). This entails deprecating one class name and keeping all function names. The two functions are useful as a convenient interface to the two popular parametrizations of the channel.
How to reproduce the issue
After the fix both calls above should return
True
.Cirq version
You can get the cirq version by printing
cirq.__version__
. From the command line:The text was updated successfully, but these errors were encountered: