def __init__(self, *params, wires=None, do_queue=True):
    self._inverse = False
    if (self.par_domain == 'N'):
        assert (self.grad_method is None), 'An operation may only be differentiated with respect to real scalar parameters.'
    elif (self.par_domain == 'A'):
        assert (self.grad_method in (None, 'F')), 'Operations that depend on arrays containing free variables may only be differentiated using the F method.'
    if (self.grad_method == 'A'):
        if (self.grad_recipe is None):
            self.grad_recipe = ([None] * self.num_params)
        else:
            assert (len(self.grad_recipe) == self.num_params), 'Gradient recipe must have one entry for each parameter!'
    else:
        assert (self.grad_recipe is None), 'Gradient recipe is only used by the A method!'
    super().__init__(*params, wires=wires, do_queue=do_queue)
def __init__(self, *params, wires=None, do_queue=True):
    self._inverse = False
    if (self.par_domain == 'N'):
        assert (self.grad_method is None), 'An operation may only be differentiated with respect to real scalar parameters.'
    elif (self.par_domain == 'A'):
        assert (self.grad_method in (None, 'F')), 'Operations that depend on arrays containing free variables may only be differentiated using the F method.'
    if (self.grad_method == 'A'):
        if (self.grad_recipe is None):
            self.grad_recipe = ([None] * self.num_params)
        else:
            assert (len(self.grad_recipe) == self.num_params), 'Gradient recipe must have one entry for each parameter!'
    else:
        assert (self.grad_recipe is None), 'Gradient recipe is only used by the A method!'
    super().__init__(*params, wires=wires, do_queue=do_queue)