The invention discloses an electromagnetic transient
simulation method,
system, equipment and medium based on an error compensation variational
algorithm, and belongs to the technical field of electromagnetic transient
simulation, and the method comprises the steps: obtaining discrete node electrical parameters of a power
system, building an electromagnetic transient
equivalent model based on the parameters, and building a
loss function; preparing a
quantum state representing node
voltage through the parameter-containing
quantum circuit, calculating a function value of a
loss function by using a measurement result of the prepared
quantum state, and iteratively updating a variational parameter of the parameter-containing
quantum circuit by using the function value; obtaining a measurement result of the
quantum state enabling the
loss function to converge, and obtaining a solved
voltage; and calculating a residual error for error compensation by using the target equivalent
admittance matrix, the injection current of the node and the solved
voltage, correcting the solved voltage by using the residual error, and obtaining the corrected voltage as an electromagnetic transient
simulation result at the current moment. According to the method, calculation errors caused by a
current noise-containing
quantum computer are relieved, and high-precision solving of the linear equation set is achieved.