  The variational quantum algorithms are crucial for the application of NISQ
computers. Such algorithms require short quantum circuits, which are more
amenable to implementation on near-term hardware, and many such methods have
been developed. One of particular interest is the so-called variational quantum
state diagonalization method, which constitutes an important algorithmic
subroutine and can be used directly to work with data encoded in quantum
states. In particular, it can be applied to discern the features of quantum
states, such as entanglement properties of a system, or in quantum machine
learning algorithms. In this work, we tackle the problem of designing a very
shallow quantum circuit, required in the quantum state diagonalization task, by
utilizing reinforcement learning (RL). We use a novel encoding method for the
RL-state, a dense reward function, and an $\epsilon$-greedy policy to achieve
this. We demonstrate that the circuits proposed by the reinforcement learning
methods are shallower than the standard variational quantum state
diagonalization algorithm and thus can be used in situations where hardware
capabilities limit the depth of quantum circuits. The methods we propose in the
paper can be readily adapted to address a wide range of variational quantum
algorithms.
