class_docstr: Test qubit-based devices' probability vector after application of gates.
class_docstr_tok: ["Test","qubit-based","devices","'","probability","vector","after","application","of","gates","."]
docstr: Test single qubit gates taking a single scalar argument.
docstr_tok: ["Test","single","qubit","gates","taking","a","single","scalar","argument","."]
code: def test_single_qubit_parameters(
      self, device, init_state, op, func, gamma, tol, skip_if, benchmark
  ):
      """Test single qubit gates taking a single scalar argument."""
      n_wires = 1
      dev = device(n_wires)
      skip_if(dev, {"returns_probs": False})
  
      rnd_state = init_state(n_wires)
  
      @qml.qnode(dev)
      def circuit():
          qml.StatePrep(rnd_state, wires=range(n_wires))
          op(gamma, wires=range(n_wires))
          return qml.probs(wires=range(n_wires))
  
      res = benchmark(circuit)
  
      expected = np.abs(func(gamma) @ rnd_state) ** 2
      assert np.allclose(res, expected, atol=tol(dev.shots))
  
imports: from cmath import exp
  from math import cos, sin, sqrt
  import pytest
  import numpy
  from scipy.linalg import block_diag
  from flaky import flaky
  import pennylane
label_desc: Use image node_id 4 for calling the TestGatesQubit obj's underlying member method code with example usage: obj.test_single_qubit_parameters(device, init_state, op, func, gamma, tol, skip_if, benchmark) and returns: qml