Controlled-U

Format:
C (control bit labels, target bit labels, matrix);
The control bit labels is a string in the style of ``1-6'' (qubit 1 to qubit 6) and/or ``1 o3 5'' (qubit 1, o3, and 5). Here, ``o'' is used to specify a 0-control bit, i.e., ``o3'' means that the matrix is applied to the target bits under the condition that the bit 3 is 0 besides the condition of the other control bits. The target bit labels is a string in the style of ``1-6'' (qubit 1 to qubit 6) and/or ``1 3 5'' (qubit 1, 3, and 5). The matrix may be given in the style of (a b)(c d) or a user-defined matrix ``A'' or something. ``X'', ``Y'', ``Z'', ``H'', ``Rx(angle)'', ``Ry(angle)'', ``Rz(angle)'' may be used as a matrix to apply to the targets. ``angle'' is the angle in radian (e.g. 0.78539816). To specify it in degree, add ``deg'' to the decimal numbers [e.g. C(1, 3, Rx(45deg))].



root
2004-06-15