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

GateOperation has no _apply_channel_ #5900

Closed
daxfohl opened this issue Oct 1, 2022 · 1 comment
Closed

GateOperation has no _apply_channel_ #5900

daxfohl opened this issue Oct 1, 2022 · 1 comment
Labels
area/gates good first issue This issue can be resolved by someone who is not familiar with the codebase. A good starting issue. good for learning For beginners in QC, this will help picking up some knowledge. Bit harder than "good first issues" kind/bug-report Something doesn't seem to work. no QC knowledge needed Want to contribute to Cirq, but don't know quantum computing? This issue is for you. triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on

Comments

@daxfohl
Copy link
Collaborator

daxfohl commented Oct 1, 2022

GateOperation needs an _apply_channel_ to simulate gates that only have _apply_channel_ defined. It is currently missing.

@daxfohl daxfohl added the kind/bug-report Something doesn't seem to work. label Oct 1, 2022
@viathor viathor added triage/discuss Needs decision / discussion, bring these up during Cirq Cynque area/gates labels Oct 4, 2022
@tanujkhattar tanujkhattar added triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on and removed triage/discuss Needs decision / discussion, bring these up during Cirq Cynque labels Oct 12, 2022
@tanujkhattar
Copy link
Collaborator

From cirq sync:

This should be done and should be a relatively easy fix.

@tanujkhattar tanujkhattar added good first issue This issue can be resolved by someone who is not familiar with the codebase. A good starting issue. no QC knowledge needed Want to contribute to Cirq, but don't know quantum computing? This issue is for you. good for learning For beginners in QC, this will help picking up some knowledge. Bit harder than "good first issues" labels Oct 12, 2022
CirqBot pushed a commit that referenced this issue Oct 13, 2022
Confusion matrix and reset channels both can be viewed as starting with a zero DM tensor and then copying (adding) in scaled slices from the original DM tensor. Thus we make a helper function that does this and add `_apply_channel_` optimizations to those gates.

Fixes #5901.

Starts #5900 though I haven't looked at all gates.

Also starts #4579 but there's likely more to do there as well. I didn't add the new test function to the primary test suite because creating superoperators is likely computationally expensive (granted most if not all gates that use this would be three or fewer qubits, which is still cheap), and the test not relevant for most gates.
@daxfohl daxfohl closed this as completed Oct 13, 2022
rht pushed a commit to rht/Cirq that referenced this issue May 1, 2023
…#5917)

Confusion matrix and reset channels both can be viewed as starting with a zero DM tensor and then copying (adding) in scaled slices from the original DM tensor. Thus we make a helper function that does this and add `_apply_channel_` optimizations to those gates.

Fixes quantumlib#5901.

Starts quantumlib#5900 though I haven't looked at all gates.

Also starts quantumlib#4579 but there's likely more to do there as well. I didn't add the new test function to the primary test suite because creating superoperators is likely computationally expensive (granted most if not all gates that use this would be three or fewer qubits, which is still cheap), and the test not relevant for most gates.
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this issue Oct 31, 2024
…#5917)

Confusion matrix and reset channels both can be viewed as starting with a zero DM tensor and then copying (adding) in scaled slices from the original DM tensor. Thus we make a helper function that does this and add `_apply_channel_` optimizations to those gates.

Fixes quantumlib#5901.

Starts quantumlib#5900 though I haven't looked at all gates.

Also starts quantumlib#4579 but there's likely more to do there as well. I didn't add the new test function to the primary test suite because creating superoperators is likely computationally expensive (granted most if not all gates that use this would be three or fewer qubits, which is still cheap), and the test not relevant for most gates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gates good first issue This issue can be resolved by someone who is not familiar with the codebase. A good starting issue. good for learning For beginners in QC, this will help picking up some knowledge. Bit harder than "good first issues" kind/bug-report Something doesn't seem to work. no QC knowledge needed Want to contribute to Cirq, but don't know quantum computing? This issue is for you. triage/accepted A consensus emerged that this bug report, feature request, or other action should be worked on
Projects
None yet
Development

No branches or pull requests

3 participants