Reinforcement Learning for Quantum Circuit Design: Using Matrix Representations