class_docstr: Tests for the finite difference gradient transform
class_docstr_tok: ["Tests","for","the","finite","difference","gradient","transform"]
docstr: Test that by providing y0 the number of tapes is equal the number of parameters.
code: def test_y0_provided(self):
      """Test that by providing y0 the number of tapes is equal the number of parameters."""
      dev = qml.device("default.qubit", wires=2)
  
      with qml.queuing.AnnotatedQueue() as q:
          qml.RX(0.543, wires=[0])
          qml.RY(-0.654, wires=[0])
          qml.expval(qml.PauliZ(0))
  
      tape = qml.tape.QuantumScript.from_queue(q)
      f0 = dev.execute(tape)
      tapes, _ = finite_diff(tape, approx_order=1, f0=f0)
  
      assert len(tapes) == tape.num_params
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices import DefaultQubitLegacy
  from pennylane.gradients import finite_diff, finite_diff_coeffs
  from pennylane.operation import AnyWires, Observable
label_desc: Use image node_id 13 for calling the TestFiniteDiff obj's underlying member method code with example usage: obj.test_y0_provided() without return types