Description of the issue
We currently have two implementations of the phase damping channel: cirq.PhaseDampingChannel and cirq.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
In [35]: cirq.has_mixture(cirq.phase_damp(0.1))
Out[35]: False
In [36]: cirq.has_mixture(cirq.phase_flip(0.1))
Out[36]: True
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:
In [38]: cirq.__version__
Out[38]: '0.13.0.dev'
Description of the issue
We currently have two implementations of the phase damping channel:
cirq.PhaseDampingChannelandcirq.PhaseFlipChannel. They implement the same channel, but use different parametrization. Also,PhaseDampingChannelfails 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: