# How to perform operations like sin over Qiskit parameters

I want to create a parameter dependent gate in qiskit and I need to compute some complex operations as sympy.atan2 or sympy.sin over the parameters but I don't know how

I've tried

from qiskit import *
from qiskit.circuit import Parameter
import sympy as sy
x=Parameter('x')
theta=Parameter('θ')
phase=sy.atan2(sy.N(x)*sy.sin(theta),sy.cos(theta))
circuit = QuantumCircuit(3,3)
circuit.cu1(phase,0,1)


but I obtain

CircuitError: 'invalid param type atan2 in instruction cu1'


I think these gates only accept float or np.float as a parameter. Try casting to one of these types, for example phase = float(phase) and it should work.