How To Write An Amplitudes File


An amplitudes file (amps file) is a TEXT file listing the transition matrices of one or more nodes of a net. Using an amps file is recommended if you wish to write a separate computer program, an amplitude generator, to calculate the transition matrix of a Custom Node. If so, you should make the amplitude generator write its results in the format described below, the format of a Quantum Fog amps file. Then you should load the amps file into a Quantum Fog project using the Import/Amplitudes... item of the Edit menu.

As an example, consider a file called my_amps.txt, that contains the following:

This amps file refers to a net with 3 or more nodes. Three of the nodes of the net are: node A with states a1 and a2, node B with states b1 and b2, and node C with states c1 and c2.

The specification of each transition matrix starts with a hash character. The first line after the hash character is the name of the node whose transition matrix follows in the amps file. The example above specifies the transition matrix of nodes A and C.

Suppose that in the above amps file, you erase the 4 lines concerning the input state (B, A) = (b1, a2) of node C. Quantum Fog will interpret this omission to mean that: For the input state (B, A) = (b1, a2), the amplitudes of the two states c1 and c2 of C are both zero. In general, if you import an amps file which lists the transition matrix of a node C but which omits some input states of C, then Quantum Fog will set to zero the amplitudes of all states of C for the omitted input states.

Pressing Export/Amplitudes... in the File menu will produce a file that follows the format rules for a Quantum Fog amps file. If no nodes are selected in the Main Window, the file will contain the transition matrices of all the nodes of the net. If some nodes are selected, the file will contain the transition matrices of only those nodes that are selected. So if you want more examples of amps files, you can ask Quantum Fog to generate some for you.

Next we will state the general rules that one must follow in writing an amps file for Quantum Fog. Some of the terminology used below is defined in the section entitled "Terminology-Alphabetic".

General Rules:

The order in which node names, input states, parent names and node state names are enumerated does not matter.


[Table Of Contents]