-
Notifications
You must be signed in to change notification settings - Fork 130
Support for qubit loss #2567
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
Support for qubit loss #2567
Conversation
This PR adds support for qubit loss to the QDK. In particular, it adds the following features: - Simulator with configured qubit loss will probabilistically "lose" qubits during application of noise (ie: any gates, measurements, or calls to `ApplyIdleNoise`), treating futher operations on that qubit as no-op. - Qubits that are lost return neither `Zero` nor `One` during measurement but a special `Loss` value that cannot be used in comparisons, triggering a runtime failure if it is. - `Std.Diagnostics.ConfigureQubitLoss` to configure the probability of qubit loss on any operation. - `Std.Measurement.MResetZChecked` which returns a tuple of `(Result, Bool)` by checking for qubit loss as part of measurement. - Loss checks generate into QIR by emitting the `__quantum__rt__read_loss` runtime function (may not be supported on all QIR targets). TODO: - [ ] Extension setting alongside Pauli noise for configuring loss probability during histogram generation - [ ] OpenQASM support for special measurement that returns loss bit - [ ] Python API for configuring loss probability on calls to `qsharp.run` - [ ] Samples Fixes #2484, #2483
Change in memory usage detected by benchmark. Memory Report for e8ac9f3
|
Change in memory usage detected by benchmark. Memory Report for 1ae48a7
|
Change in memory usage detected by benchmark. Memory Report for 804715b
|
Change in memory usage detected by benchmark. Memory Report for 6d5684f
|
Change in memory usage detected by benchmark. Memory Report for 14cfb62
|
Change in memory usage detected by benchmark. Memory Report for 669e265
|
Change in memory usage detected by benchmark. Memory Report for 5aea8d8
|
Change in memory usage detected by benchmark. Memory Report for 57f2b0a
|
Change in memory usage detected by benchmark. Memory Report for 5db9cae
|
Change in memory usage detected by benchmark. Memory Report for 5a3bb11
|
Change in memory usage detected by benchmark. Memory Report for 316efa3
|
Change in memory usage detected by benchmark. Memory Report for 6941e18
|
Change in memory usage detected by benchmark. Memory Report for 1c18ba4
|
Change in memory usage detected by benchmark. Memory Report for 2688643
|
This PR adds support for qubit loss to the QDK. In particular, it adds the following features:
ApplyIdleNoise
), treating futher operations on that qubit as no-op.Zero
norOne
during measurement but a specialLoss
value that cannot be used in comparisons, triggering a runtime failure if it is.Std.Diagnostics.ConfigureQubitLoss
to configure the probability of qubit loss on any operation.Std.Measurement.MResetZChecked
which returns a tuple of(Result, Bool)
by checking for qubit loss as part of measurement.__quantum__rt__read_loss
runtime function (may not be supported on all QIR targets).Additional features:
qsharp.run
Fixes #2484, fixes #2483