A wireless charger, comprising a class-E power amplifier and a tunable impedance circuit that is connected to an output end of the class-E power amplifier, wherein the class-E power amplifier comprises a switching transistor and a tunable capacitance circuit that is parallelly connected to the switching transistor; and the wireless charger further comprises a control unit, wherein the control unit is configured to obtain a constraint condition of the class-E power amplifier, wherein the constraint condition comprises a target efficiency of the class-E power amplifier, a target output power of the class-E power amplifier, and a circuit parameter of the class-E power amplifier, the target efficiency is a preset minimum output efficiency of the class-E power amplifier, and the target output power is a preset constant output power of the class-E power amplifier; the control unit is further configured to determine N1 target equivalent load impedances of the class-E power amplifier based on the constraint condition, wherein N1 is 1 or an integer greater than 1; and the control unit is further configured to: adjust a capacitance value of the tunable capacitance circuit in the class-E power amplifier, and adjust an impedance value of the tunable impedance circuit, to enable an equivalent load impedance of the class-E power amplifier to match one of the N1 target equivalent load impedances, wherein the control unit is configured to: if the tunable capacitance circuit has N2 values obtainable through adjustment, each capacitance value obtainable through adjustment corresponds to one Smith chart, and each Smith chart corresponds to one target curve segment that meets the constraint condition, wherein N2 is an integer greater than or equal to 2, select N1 points from N2 target curve segments, and use a set of impedances corresponding to the N1 points as the N1 target equivalent load impedances of the class-E power amplifier. the control unit is configured to obtain a constraint condition of the class-E power amplifier, wherein the constraint condition comprises a target efficiency of the class-E power amplifier, a target output power of the class-E power amplifier, and a circuit parameter of the class-E power amplifier, the target efficiency is a preset minimum output efficiency of the class-E power amplifier, and the target output power is a preset constant output power of the class-E power amplifier; the control unit is further configured to determine N1 target equivalent load impedances of the class-E power amplifier based on the constraint condition, wherein N1 is 1 or an integer greater than 1; and the control unit is further configured to: adjust a capacitance value of the tunable capacitance circuit in the class-E power amplifier, and adjust an impedance value of the tunable impedance circuit, to enable an equivalent load impedance of the class-E power amplifier to match one of the N1 target equivalent load impedances, wherein the control unit is configured to: if the tunable capacitance circuit has N2 values obtainable through adjustment, each capacitance value obtainable through adjustment corresponds to one Smith chart, and each Smith chart corresponds to one target curve segment that meets the constraint condition, wherein N2 is an integer greater than or equal to 2, select N1 points from N2 target curve segments, and use a set of impedances corresponding to the N1 points as the N1 target equivalent load impedances of the class-E power amplifier.