Qiskit Practice
kibrahim757 66 questions

Qiskit v2.x mock exam

Select one answer per question. Submit to see the explanation.

Question 25 / 66
Given the following code, what does qc.assign_parameters({theta: np.pi/2}) do?
theta = Parameter("θ")

qc = QuantumCircuit(1)

qc.ry(theta, 0)

qc = qc.assign_parameters({theta: np.pi/2},inplace=True)