## Clear Text Example

### Example 9. Consider the following sentences from "Scientific American":

A quantum computer can work on a superposition of many different inputs at once. For example, it could run an algorithm simultaneously on one million inputs, using only as many qubits as a conventional computer would need bits to run the algorithm once on a single input. Theorist have proved that algoritithms running on a quantum computer can solve certain problems faster(that is, in fewer computational steps) than any known algorithm running on a classical computer can. The problems include finding items in a database and factoring large numbers, which is of great interest for breaking secret codes.
The problem with the above sentence lies in text: Theorist have proved. How did they do that? How can they prove something about something that does not exist.
In order to see in more detail what the issues are let us study the following quoted subject:finding items in a database. This is still a very large subject. In order to narrow down this subject let us study the following example: count the number of letters in a sentence.

### Implementation 1: Single processor

In order to write such a program we first have to define the following items of the database:
1. a textstring which contains the sentence under investigation.
2. an array of 26 items which contains the letters of the alphabet from A to Z. This we call the letterarray.
3. an array of 26 items which contains the counts of the corresponding letter. This we call the countarray. Item 1 of countarray corresponds which item 1 of the letterarray i.e. the number of times the letter A is in the textstring.

The program we have to write consists of three parts: An outer loop, an inner loop and a small process.

1. In the outerloop we calculate the letter from the textstring we want to count. This is called the textletter. We start with the first letter in the textstring until the last letter in the textstring.
2. In the innerloop we calculate the letter from the alphabet (i.e. letterarray) with which we want to compare the textletter. This we call the alphabetletter. We start with item 1 from the letterarray untill item 26 from the letterarray.
3. In the process part we basically do a comparison. We compare if the textletter is equal to the alphabetletter. When both are equal we increase the corresponding countarray, otherwise we do nothing.
For the computer compare means to subtract two numbers and decide if the result is zero. The increase means to add 1 to an item in the countarray.
This shows the steps involved for a clasical computer to do this job.
For a quantum computer the steps are the same.

### Implementation 2: Multi processor

The above program on a clasical process uses one processor.
In order to speed up the program you could implement the process part on 26 processors i.e. one processor for each letter. The program consists now of two parts: A loop and a process
1. In the loop we calculate the letter from the textstring we want to count. This is called the textletter. We start with the first letter in the textstring until the last letter in the textstring.
2. Start all the 26 processoren. All the processoren will now work in parallel
Each processor will do the following:
1. In each processor we basically do a comparison. We compare if the textletter is equal to the letter that the processor is supposed to process. When both are equal we increase the corresponding countarray, otherwise we do nothing.
Processor 1 will process the A, Processor 2 will process the B etc.
Only one processor will find a match and update the count
This shows the steps how a clasical computer does this job when 26 processors can be used.
For a quantum computer the steps are the same. The quantum computer has to be modified compared with the first implementation.

In order to get a copy select:CNTTEXT.BAS
In order to see the listing select:CNTTEXT.HTM
For operation select:CNTOPER.HTM

### Reflection

The sentence under study starts with:A quantum computer can work on a superposition of many different inputs at once.
What is for sure is that:
• A quantum computer can work on a number of parameters in parallel.
• And so can a clasical computer
The article fails to explain what for a quantum computer the advantages are that its working is based on superpositions (including quantum teleportation and photon entanglement) in the sense that those concepts reduce the number of steps involved in performing a certain calculation.
The article fails to indentify exacly which part of a calculation a quantum computer can do faster. Does a quantum computer immediate know which word in the Encyclopedia Britannica you want to understand? I doubt that. Ofcourse if a quantum computer consist of as many of processors as there are words in the Encyclopedia than you can speed up your search. But the same is for a clasical computer. IMO assuming that there is a difference, than this difference must be much more subtle. The article fails to explain that.
The sentence under investigationstates that:Theorist have proved that algoritithms running on a quantum computer can solve certain problems faster etc
I hope that they do not mean 1%. The article fails because it does not give enough detail to prove there point. IMO the theorist are to quick in claiming this advantage.
Ofcourse if a quantum computer is smaller than a clasical computer than it can be faster. But that is not what the sentence under investigation claims: fewer computational steps are required. The article does not show a shred of evidence, to explain the details of this claim. As stated before concepts like: superpositions, quantum teleportation and photon entanglement do not support this claim.

None