We introduce a simple algorithm providing a compressed representation (is an element of R-NorbitsxNorbits x N-Norbits) of an irreducible Hamiltonian matrix (number of magnons M constrained, dimension: N-spins!/M!(N-spins-M)! > N-orbits) of the spin-1/2 Heisenberg anti-ferromagnet on the L x L non-periodic lattice, not looking for a good basis. As L increases, the ratio of the matrix dimension to Norbits converges to 8 (order of the symmetry group of square) for the exact ground state computation. The sparsity of the Hamiltonian is retained in the compressed representation. Thus, the computational time and memory consumptions are reduced in proportion to the ratio. (C) 2016 Author(s). All article content, except where otherwise noted, is licensed under a Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).