# How to assign new parameters to an existing quantum circuit?

Say I have a quantum circuit like this

This is an ansatz for solving linear equation provided in the Qiskit's textbook

In the textbook, it was shown how to find the optimal parameters of this ansatz such that the cost function is minimized. I want to assign the array of optimal parameters to this ansatz. How do I do it?

You can use assign_parameters() method:
circ.assign_parameters(params, inplace=True)

where params is the array of optimal parameters.