cirq.kraus
Returns a list of matrices describing the channel for the given value.
cirq.kraus(
val: Any, default: Any = RaiseTypeErrorIfNotProvided
) -> Union[Tuple[np.ndarray, ...], TDefault]
Used in the notebooks
These matrices are the terms in the operator sum representation of
a quantum channel. If the returned matrices are \({A_0,A_1,..., A_{r-1} }\),
then this describes the channel:
$$
\rho \rightarrow \sum_{k=0}^{r-1} A_k \rho A_k^\dagger
$$
These matrices are required to satisfy the trace preserving condition
$$
\sum_{k=0}^{r-1} A_k^\dagger A_k = I
$$
where \(I\) is the identity matrix. The matrices \(A_k\) are sometimes called
Kraus or noise operators.
Args |
val
|
The value to describe by a channel.
|
default
|
Determines the fallback behavior when val doesn't have
a channel. If default is not set, a TypeError is raised. If
default is set to a value, that value is returned.
|
Returns |
If val has a _kraus_ method and its result is not NotImplemented,
that result is returned. Otherwise, if val has a _mixture_ method
and its results is not NotImplement a tuple made up of channel
corresponding to that mixture being a probabilistic mixture of unitaries
is returned. Otherwise, if val has a _unitary_ method and
its result is not NotImplemented a tuple made up of that result is
returned. Otherwise, if a default value was specified, the default
value is returned.
|
Raises |
TypeError
|
val doesn't have a kraus or unitary method (or that
method returned NotImplemented) and also no default value was
specified.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-06-27 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."],[],[]]