| Prev: The Quantum Application | Up: Contents | Next: Performing a Quantum Factorisation |
Firstly load the Haskell input file circuit.hs using the Open command on the File menu.
Select the Start Simulation command on the Quantum menu. You will be presented with the dialog box in Figure 35.
Enter the circuit to evaluate in the Function edit field. If the function is a quantum factorisation function (and it agrees with the implementation described in XXXX) then select the input type 'For quantum factorisation'. Otherwise leave the selection on 'From Haskell Input'.
Next, select the type of output format that you require. If you select 'Probabilities' the simulation will output the real probabilities of circuit upon completion of the simulation. Selecting Amplitudes results in complex amplitudes being output. Use 'Histogram of values' if you want to perform a histogram over the output. This is usually the what you would select if your circuit was made of more than one quantum register and you wanted to output the results of one only register (for instance in quantum factorisation).
Then select the bits that you would like to be output. If you have selected a type of Probabilities or Amplitude then the rest of the output bits are assumed to be zero. For instance, choosing bits 2 to 3 will result in the amplitudes or probabilities of the values 4 to 7 being output. If the type of output is a histogram then you will get a histogram of the probabilities of observing all of the different combinations of the bits that you select. For instance, choosing bits 2 to 3 will output a table containing the probability of observing 00, 01, 10 and 11 on bits 2 and 3.
The Format section allows you to select between outputting values in binary or decimal. 'Selecting Output To File' will cause the output of the simulator to be dumped to a file. Leaving this field unselected results in the output being placed in the simulator window.
Select OK to start the simulation. If you have selected the 'quantum factorisation' option then you will then be presented with a dialog box (shown in Figure 36) where you can enter the number to factorise. The number to factorise will be constrained by the size of the circuit in accordance with Shor's algorithm.
During the simulation a progress dialog box will appear. An example is shown in Figure 37. You can terminate the simulation at any time by pressing the Cancel button at the bottom of the box.
The top section of the dialog box shows information on the simulation being executed and the algorithm being used to simulate the circuit. A progress meter occupies the middle section. At the lower end of the dialog box is a graphical display of the current state of the simulation. The graphical display is turned off by default as can halve the execution speed of the simulation. The 'Show graphical progress' check-box allows you to toggle the graphics on or off. The '2/3 histogram option' shows a histogram of the first 2/3 of the circuit and allows a graphical representation of the output from a quantum factorisation. The dialog box can be resized in order to expand the view of the graph.
Each column of pixels in the graphical display is mapped to one or more states in the simulation. Each column is divided in to three areas. The top of the blue area represents the minimum probability obtained across the states that the column represents. The top of the green area represents the average probability of the states and the top of the red area represents the maximum probability.
The example shows a quantum factorisation that is nearly completed. Here you can see the destructive and constructive interference processes at work. Most of the states have no real probability of existing due to destructive interference. The few remaining viable states have been the result of many iterations of constructive interference. The following mural shows the graphs generated by an attempted factorisation.
The grey bar at the bottom of the screen shows how many of the probabilities in the state are greater than 0.0001. It shows content of the information in the system and the maximum gains that could be possible using an idealised sparse vector.
| Prev: The Quantum Application | Up: Contents | Next: Performing a Quantum Factorisation |
This web page (c) 2000 Jon Marshall. Last updated 3rd June 2000