Algorithms for calculating unitary matrices determined by quantum circuits are discussed. The algorithms are used in the program QuantumCircuit designed for modeling quantum circuits. Practical implementations of the algorithms as functions written in the language of the Mathematica system are sug gested.