Abstract
We propose quantum algorithms, purely quantum in nature, for calculating the determinant and inverse of an (N – 1) × (N – 1) matrix (depth is O(N2 log N)) which is a simple modification of the algorithm for calculating the determinant of an N × N matrix (depth is O(N log2 N)). The basic idea is to encode each row of the matrix into a pure state of some quantum system. In addition, we use the representation of the elements of the inverse matrix in terms of algebraic complements. This algorithm together with that for matrix multiplication proposed earlier yields the algorithm for solving systems of linear algebraic equations (depth is O(N log2 N)). Measurement of the ancilla state with output 1 (probability is ~ 2−O(N log N)) removes the garbage acquired during calculation. Appropriate circuits for all three algorithms are presented and have the same estimation O(N log N) for the space (number of qubits in the circuit).