Skip to content

Redundant implementations of phase damping channel #4578

Description

@viathor

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'

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/channelshelp wantedContributions welcome!kind/bug-reportSomething doesn't seem to work.triage/acceptedA consensus emerged that this bug report, feature request, or other action should be worked on

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions