Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allow_decompose flag on has_channel #3249

Merged
merged 3 commits into from
Aug 26, 2020
Merged

Conversation

maffoo
Copy link
Contributor

@maffoo maffoo commented Aug 19, 2020

Also use this flag in DensityMatrixSimulator to allow simulating operations that decompose into channels.

Also use this flag in DensityMatrixSimulator to allow simulating
operations that decompose into channels.
@googlebot googlebot added the cla: yes Makes googlebot stop complaining. label Aug 19, 2020
Copy link
Contributor

@balopat balopat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing this inconsistency! LGTM, with two tiny nits.

decompose an object to check if it is unitary as part of determining
if the object is a quantum channel, when the quantum channel check
will already be doing a more general decomposition check). Defaults
to True. When false, the decomposition strategy for determining
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: False

@@ -20,6 +20,8 @@
import numpy as np
from typing_extensions import Protocol

from cirq.protocols.decompose_protocol import \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: prefer parens over \ + newline

@maffoo maffoo merged commit 898a1ff into master Aug 26, 2020
@maffoo maffoo deleted the u/maffoo/channel-decompose branch August 26, 2020 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants