-
Notifications
You must be signed in to change notification settings - Fork 1
correlated loss support #526
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
Changes from 6 commits
9352266
6a07247
2c90cac
cd69a37
d8c5318
646a478
2bba610
bcb3e76
4e71bee
51d7c3f
fdafe6d
4c3f852
86a499f
23fb34d
03a3358
ca3c198
d130835
20fe041
73ea0b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| from typing import Literal, TypeVar | ||
| from typing import Any, Literal, TypeVar | ||
|
|
||
| from kirin.dialects import ilist | ||
|
|
||
|
|
@@ -97,6 +97,20 @@ def qubit_loss(p: float, qubit: Qubit) -> None: | |
| broadcast.qubit_loss(p, ilist.IList([qubit])) | ||
|
|
||
|
|
||
| @kernel | ||
| def correlated_qubit_loss(p: float, qubits: ilist.IList[Qubit, Any]) -> None: | ||
| """ | ||
| Apply a correlated qubit loss channel to the given qubits. | ||
|
|
||
| All qubits are lost together with a probability `p`. | ||
|
|
||
| Args: | ||
| p (float): Probability of the qubits being lost. | ||
| qubits (IList[Qubit, Any]): The list of qubits to which the correlated noise channel is applied. | ||
| """ | ||
| broadcast.correlated_qubit_loss(p, qubits) | ||
|
||
|
|
||
|
|
||
| # NOTE: actual stdlib that doesn't wrap statements starts here | ||
|
|
||
|
|
||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The python 3.10 build is producing a lot of warnings (this currently also happens on
main)These warnings are coming internally from cirq 1.5.0. The solution is to simply upgrade to cirq 1.6 which requires Python 3.11 (which is why only the 3.10 build has these issues).
I've gone ahead and filtered these warnings.