The style of the simulation language, comment, define, etc.

  1. The labels that point qubits are 1,2,...,n from the upper qubits to the lower in the n-qubit input of a circuit.
  2. The labels for the ket vectors are $ \vert\rangle,\vert 1\rangle,\ldots, \vert 2^n-1\rangle$ for an n-qubit circuit. (Attaching the labels to qubits in the subscripts, the vectors are denoted as $ \vert_10_2\ldots0_n\rangle,\ldots,\vert 1_11_2\ldots1_n\rangle$.)
  3. Comment lines that one does not want to execute may be written with '#' in the head of the line:
    # This is a comment.
  4. In the file-input mode, each command must be terminated with ';'. The semicolon may be omitted in the read-line mode.
  5. In the file-input mode, a line may be concatenated with the next line with a backslash '\'.
  6. An external file may be included by
    include "file"
  7. A time step of operations is the sentences from ':' to ':'. Before the first colon, the initial vector or matrix must be set by ``mload'' or a ``init...'' command.
    Example:
    	  init-thermal-biases 0.7 -0.7 0.2;
    	  10: H(1 2);
    	  20: showb;
    
  8. *** You cannot use ``define'' in the read-line mode. It may be used only in a file. *** The word ``define'' defines the first subsequent word as the rest subsequent term down to the end of the current line (lines may be concatenated with a backslash). For an example,
    define SQRT2 1.4142135
    define PI 3.141516
    Note that a semicolon should not be placed in if you define a constant. A set of operators (or a function) can also be defined e.g.
    define Op1 \
    X(2-5); H(2-5);\
    print This is Op1.;\
    Rx(1-3, 45deg);
    defines the user-defined operator Op1.
root
2004-06-15