programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Bear Bibeault
• Paul Clapham
• Jeanne Boyarsky
• Knute Snortum
Sheriffs:
• Liutauras Vilda
• Tim Cooke
• Junilu Lacar
Saloon Keepers:
• Ron McLeod
• Stephan van Hulst
• Tim Moores
• Tim Holloway
• Carey Brown
Bartenders:
• Joe Ess
• salvin francis
• fred rosenberger

# How often do I have to repeat my calculation to become confident about the result?

Greenhorn
Posts: 4
1
For the following, let's ignore the noise of real existing systems. Im talking of an ideally QPU.
When we think and talk about qubits, they contain complex numbers describing something about the probability to read a certain value. So after my first program run, I get a first result, knowing nothing about its probability.

Supposed we have 8 qubits, we have 256 possible results, but only a few have a remarkable probability.
May be there's only one noteworthy result, may be there is no solution at all? All this is reflected in the probability distribution.
To get an idea of the probability distribution, I have to repeat the complete calculation multiple times to get more read results.
So after 10 complete cycles I have (at most) 10 result values, out of 256 possible.

In statistics (not my pet) I always heard "the sample has to be big enough" - yeah, how many is "big enough"?
Actually, each result gained from a QPU processing should contain the reliability of the result, like every other measurement in physics.

Let's narrow it:
If I know there is only one result, the candidate should be clear after let#s say 10 cycles. But this is just a feeling, I cannot evaluate the error rate.
If there're two expected results (e.g. root-finding like Newton), how many cycles would I need to become confident about the result? It gets worse if there are more roots I didn't expect...

As a QPU programmer, will I have to code that cycles explicitly or is this hidden by the device?

Author
Posts: 30
11
• 1
Hi Frank! This is a great question; the answer is sometimes simple and sometimes baffling.

Frank Röber wrote: For the following, let's ignore the noise of real existing systems. Im talking of an ideally QPU.

I agree that this is useful. Considering a fault-tolerant QPU lets you focus on the issue, not the noise. And we'll have those soon enough. Here's a link to the company I work for, which is building one such device.

Frank Röber wrote:For the following, let's ignore the noise of real existing systems. Im talking of an ideally QPU.
If I know there is only one result, the candidate should be clear after let#s say 10 cycles. But this is just a feeling, I cannot evaluate the error rate.
If there're two expected results (e.g. root-finding like Newton), how many cycles would I need to become confident about the result? It gets worse if there are more roots I didn't expect...

My statistics is also patchy, but if you know there's one correct answer, and a 98% chance of getting the right answer with one run, then there's a 1.0 - 0.02*0.02 = 99.96% chance that at least one of two runs will be correct. So that's also about the probability (seat-of-the-pants leap of logic here, someone please correct me) that if you do see two identical results, the answer you see is correct.

However there's a big (huge) help when it comes to many common algorithms: I's often hard to find the answer, but easy to verify it. For example, in the Shor chapter of the octopus book, the program produces factors of a number, so simple multiplication will tell you whether or not you need to re-run it.

In Figure 10-8 of the Quantum Search chapter you can also check the answer, but doing so requires possibly getting eaten by a tiger.

Frank Röber wrote:As a QPU programmer, will I have to code that cycles explicitly or is this hidden by the device?

Both. For example, when using the IBM 5Q (as in the Quantum Teleportation chapter of the octopus book) you can specify a number of runs, and it will aggregate the results for you (see Figure 4.5). If you need to modify the program based on output from each previous run, then you'll need to run them one at a time.

Saloon Keeper
Posts: 11185
244
Yeah, really good question, and thanks for the answer too!

 Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters?