中国物理B ›› 2024, Vol. 33 ›› Issue (2): 20311-020311.doi: 10.1088/1674-1056/ad09cd
Anqi Zhang(张安琪)1, Chunhui Wu(武春辉)1, and Shengmei Zhao(赵生妹)1,2,†
Anqi Zhang(张安琪)1, Chunhui Wu(武春辉)1, and Shengmei Zhao(赵生妹)1,2,†
摘要: A Gray code based gradient-free optimization (GCO) algorithm is proposed to update the parameters of parameterized quantum circuits (PQCs) in this work. Each parameter of PQCs is encoded as a binary string, named as a gene, and a genetic-based method is adopted to select the offsprings. The individuals in the offspring are decoded in Gray code way to keep Hamming distance, and then are evaluated to obtain the best one with the lowest cost value in each iteration. The algorithm is performed iteratively for all parameters one by one until the cost value satisfies the stop condition or the number of iterations is reached. The GCO algorithm is demonstrated for classification tasks in Iris and MNIST datasets, and their performance are compared by those with the Bayesian optimization algorithm and binary code based optimization algorithm. The simulation results show that the GCO algorithm can reach high accuracies steadily for quantum classification tasks. Importantly, the GCO algorithm has a robust performance in the noise environment.
中图分类号: (Quantum algorithms, protocols, and simulations)