qrisp.Operation.bind_parameters#

Operation.bind_parameters(subs_dic)[source]#

Binds abstract parameters to specified values.

Parameters:
subs_dicdict

A dictionary containing the parameters as keys.

Returns:
resOperation

The Operation with bound parameters.

Examples

We create a phase gate with an abstract parameter and bind it to a specified value.

>>> from qrisp import PGate
>>> from sympy import Symbol
>>> phi = Symbol("phi")
>>> abstract_p_gate = PGate(phi)
>>> abstract_p_gate.params
[phi]
>>> bound_p_gate = abstract_p_gate.bind_parameters({phi : 1.5})
>>> bound_p_gate.params
[1.5]