Comments (2)
- Update extrapolator(s) to handle zero variance smoothly, introducing support for the identity observable.
I would prioritize this step over the other two. The rest sounds good to me.
from prototype-zne.
Thanks for reporting this @mberna, read below for my initial assessment (c.c. @1ucian0).
Note
Because of the nature of this issue, it is very limited in scope and unlikely to affect anything other than trivial computations or misuses of the tool (e.g. to mitigate errors on a zero-noise/ideal simulator and under especial circumstances).
Observations
-
Due to the observable being the trivial one (i.e. identity
III...
) the expectation value is always1.0
with variance0.0
regardless of the circuit, (level of) noise, or anything else. Because of such null variance, thescipy.curvefit
extrapolation fails while trying to compute the induced error bar —a feature that came out in version1.1.0
. -
Real world cases where the variance is zero are highly unlikely to occur —if they ever do— since they arise in scenarios where the computation is fully deterministic: a condition that is rarely met for expectation value calculations via sampling even in the absence of noise (i.e. only if the state is an eigenstate of the observable and measurement takes place in an eigenbasis).
-
In the following line you are requesting to amplify the noise only on two-qubit gates:
zne_strategy = ZNEStrategy(noise_factors=[1, 3, 5], noise_amplifier=TwoQubitAmplifier())
Since there are no such gates in your circuit (before decomposition), the noise amplification fails with a warning:
UserWarning: Noise amplification is not performed since none of the gates are folded.
-
TwoQubitAmplifier
is the default behavior if no explicit amplifier is passed since version1.0.0rc0
—improving upon the previous defaultCxAmplifier
which only addresses CNOT gates. This is especially intended for use with already transpiled circuits, where all gates are going to be either one or two-qubit gates. For this particular case, something like the vanillaLocalFoldingAmplifier
orGlobalFoldingAmplifier
would be more suited.
Next steps
- Update extrapolator(s) to handle zero variance smoothly, introducing support for the identity observable.
- Build a new
MultiQubitAmplifier
which will amplify noise in all gates withnum_qubits > 1
. - Set such
MultiQubitAmplifier
as the new default inZNEStrategy
.
Please, let me know if you agree to this and I will proceed.
from prototype-zne.
Related Issues (20)
- Refactor `ZNEStrategy`
- Isolate indexing logic for noisy experiments HOT 4
- Allow bypassing ZNE functionality from `run()`
- Update docstrings dynamically
- Missing barriers in `GlobalFoldingAmplifier`
- Allow number of noise factors instead of listing them
- Add method for computing a list of realizable noise factors for folding amplifiers
- Add a plotting utility for results
- Caching in `ZNEStrategy` incompatible with being mutable
- Add `PolynomialExtrapolator` facades for different degrees
- Add `TwoQubitAmplifier` facade
- Add `RichardsonExtrapolator`
- Test `Extrapolator` and `NoiseAmplifier` facades
- Update development status classifier to stable
- Add caching functionality
- Strategy: add pickle handling
- how to set seed when using ZNEStrategy HOT 1
- Using ZNE with Aer primitives
- Pass effective noise factors to extrapolator
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prototype-zne.