In order to enhance the global optimization capability and quorum sensing mechanism of Bacterial Foraging Optimization (BFO) algorithm, a novel Bacterial Foraging Optimization algorithm with Quantum Behavior (QBFO) is proposed. In this method, the bacteria individual is described in the quantum space and a potential well model is created. Using Monte Carlo method to achieve the reproduction of bacterial swarming, and which makes the population are able to search the whole space. In view of the defects of the fixed swim step in bacterial foraging algorithm, a dynamic indented control strategy is introduced in this paper, which ensures the convergence of algorithm and increases the possibility of exploring a global optimum. The experiment results on classic functions demonstrate the global convergence ability of the proposed method with better accuracy and more probability of finding global optimum.