-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Channel testing utilities #4579
Labels
area/channels
area/testing
kind/feature-request
Describes new functionality
triage/accepted
A consensus emerged that this bug report, feature request, or other action should be worked on
Comments
The utilities should also validate the behavior of |
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.
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/channels
area/testing
kind/feature-request
Describes new functionality
triage/accepted
A consensus emerged that this bug report, feature request, or other action should be worked on
Is your feature request related to a use case or problem? Please describe.
Elementary objects in cirq (e.g. quantum gates) are represented as classes with overspecified properties. In other words, they directly provide information that can be computed from other information already available. For example, a quantum gate may provide an implementation of
_apply_unitary_
as well as_unitary_
and/or_decompose_
. At the same time, we ensure consistency of this information using a number of utilities implemented incirq.testing
. This is a nice approach as it shifts the cost of computation from the user to testing.With the addition of superoperator and Choi representations of channels to cirq, we will soon have redundant specifications of channels. This calls for suitable consistency checks to be implemented in
cirq.testing
.Describe the solution you'd like
We should check that for each channel Kraus, Choi and superoperator representations describe the same channel. We should also implement consistency checks between existing channel-related protocols
unitary
,kraus
andmixture
. In addition, the new testing utilities could verify other related properties such as:[optional] Describe alternatives/workarounds you've considered
[optional] Additional context (e.g. screenshots)
What is the urgency from your perspective for this issue? Is it blocking important work?
P3 - I'm not really blocked by it, it is an idea I'd like to discuss / suggestion based on principle
The text was updated successfully, but these errors were encountered: