class_docstr: Tests keywords, multiple arguments, and non-training arguments in relevant optimizers
docstr: Tests that a cost function that takes one non-trainable and one
  trainable parameter executes well.
docstr_tok: ["Tests","that","a","cost","function","that","takes","one","non-trainable","and","one","trainable","parameter","executes","well","."]
code: def test_one_non_trainable_one_trainable(self, opt):
      """Tests that a cost function that takes one non-trainable and one
      trainable parameter executes well."""
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev)
      def circuit(x):
          qml.RX(x, wires=0)
          return qml.expval(qml.PauliZ(0) @ qml.PauliZ(1))
  
      def cost(
          target, x
      ):  # Note: the order of the arguments has been swapped
          return (circuit(x) - target) ** 2
  
      ev = np.tensor(0.7781, requires_grad=False)
      x = np.tensor(0.0, requires_grad=True)
  
      original_ev = ev
  
      (ev, x), cost = opt.step_and_cost(cost, ev, x)
      # check that the argument to RX doesn't change, as the X rotation doesn't influence <Z>
      assert x == 0
      assert ev == original_ev
  
file_path: pennylane/tests/optimize/test_optimize.py
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.optimize import GradientDescentOptimizer, MomentumOptimizer, NesterovMomentumOptimizer, AdagradOptimizer, RMSPropOptimizer, AdamOptimizer
label_desc: Use image node_id 6 for calling the TestOverOpts obj's underlying member method code with example usage: obj.test_one_non_trainable_one_trainable(opt) and returns: qml, unknown