Quantum computing is a new and advanced topic that refers to calculations based on the principles of quantum mechanics. Itmakes certain kinds of problems be solved easier compared to classical computers. This advantage of quantum computingcan be used to implement many existing problems in different fields incredibly effectively. One important field that quantumcomputing has shown great results in machine learning. Until now, many different quantum algorithms have been presented toperform different machine learning approaches. In some special cases, the execution time of these quantum algorithms will bereduced exponentially compared to the classical ones. But at the same time, with increasing data volume and computationtime, taking care of systems to prevent unwanted interactions with the environment can be a daunting task and since thesealgorithms work on machine learning problems, which usually includes big data, their implementation is very costly in terms ofquantum resources. Here, in this paper, we have proposed an approach to reduce the cost of quantum circuits and to optimizequantum machine learning circuits in particular. To reduce the number of resources used, in this paper an approach includingdifferent optimization algorithms is considered. Our approach is used to optimize quantum machine learning algorithms forbig data. In this case, the optimized circuits run quantum machine learning algorithms in less time than the original onesand by preserving the original functionality. Our approach improves the number of quantum gates by 10.7% and 14.9% indifferent circuits and the number of time steps is reduced by three and 15 units, respectively. This is the amount of reduction forone iteration of a given sub-circuit U in the main circuit. For cases where this sub-circuit is repeated more times in the maincircuit, the optimization rate is increased. Therefore, by applying the proposed method to circuits with big data, both cost andperformance are improved.