class_docstr: Test the utility function _one_parameter_paulirot_coeffs.
class_docstr_tok: ["Test","the","utility","function","_one_parameter_paulirot_coeffs","."]
docstr: Test that the output for a skew-Hermitian input is real-valued
  and has the correct shape(s).
docstr_tok: ["Test","that","the","output","for","a","skew-Hermitian","input","is","real-valued","and","has","the","correct","shape","(","s",")","."]
code: def test_output_properties(
      self, num_wires, pardims, r_dtype, c_dtype
  ):
      """Test that the output for a skew-Hermitian input is real-valued
      and has the correct shape(s)."""
      import jax.numpy as jnp
  
      r_dtype, c_dtype = getattr(jnp, r_dtype), getattr(jnp, c_dtype)
      dim = 2**num_wires
      gen_shapes = [pardim + (dim, dim) for pardim in pardims]
      gens = tuple(
          np.random.random(sh) + 1j * np.random.random(sh)
          for sh in gen_shapes
      )
      # make skew-Hermitian and cast to right complex dtype
      gens = tuple(
          (g - np.moveaxis(g.conj(), -2, -1)).astype(c_dtype)
          for g in gens
      )
  
      coeffs = _one_parameter_paulirot_coeffs(gens, num_wires)
      assert isinstance(coeffs, tuple)
      assert len(coeffs) == len(pardims)
      assert all(
          c.shape == (4**num_wires - 1, *pardim)
          for c, pardim in zip(coeffs, pardims)
      )
      assert all(c.dtype == r_dtype for c in coeffs)
  
imports: import copy
  import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.ops.qubit.special_unitary import pauli_basis_matrices, pauli_basis_strings
  from pennylane.math import expand_matrix
  from pennylane.gradients.pulse_gradient_odegen import _generate_tapes_and_coeffs, pulse_odegen, _insert_op, _nonzero_coeffs_and_words, _one_parameter_generators, _one_parameter_paulirot_coeffs, _parshift_and_contract
label_desc: Use image node_id 1 for calling the TestOneParameterPauliRotCoeffs obj's underlying member method code with example usage: obj.test_output_properties(num_wires, pardims, r_dtype, c_dtype) without return types