Increasing the implementation of distributed generation and introducing multi-carrier energy systems highlight the need for energy hub systems. The energy hub is a new idea implemented in multi-carrier energy systems, sending, receiving, and storing different energy types. Therefore, the present paper proposes an improved energy hub consisting of different types of renewable energy-based DG units considering electricity and heating storage systems, which models the system’s operation and planning aspects. Furthermore, optimal planning and scheduling of multi-carrier energy hub system is modeled considering the stochastic behavior of wind and photovoltaic units. The operation section’s main challenge is determining the optimal interaction between different resources for supplying other loads in the system. The presented model is solved using a robust method based on a Quantum Particle Swarm Optimization (QPSO) approach to minimize the energy hub system’s total cost. The minimization of fuel consumption and pollutant emissions due to implementing the residential energy hub’s thermal storage system is evaluated. Simulation results show that the amount of consumed natural gas reduces by 48% after using CHP units produced heat to supply heating and cooling loads. After installing CHP and thermal storages in the energy hub system, the amount of CO 2 has reduced by about 904 tons during a year. It can be concluded that the produced power of CHP is at the highest, which is equal to 61%, as it can generate electricity at all times during the day. Moreover, to evaluate the efficiency of the proposed methodology, the Genetic Algorithm (GA) and PSO algorithm are also implemented for optimization of the mentioned energy hub system. The performance of the mentioned algorithms is compared with each other, and the results depicted that the QPSO algorithm is the best and the convergence speed and global search ability of the QPSO algorithm are significantly better than PSO and GA algorithms The obtained numerical results verify the efficiency of the proposed method in the optimal scheduling and planning of the energy hub system in the presence of stochastic renewable energy systems.