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'