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 generators of all possible ``PauliRot`` gates are correctly decomposed
  into canonical basis vectors as coefficients.
docstr_tok: ["Test","that","the","generators","of","all","possible","``","PauliRot","``","gates","are","correctly","decomposed","into","canonical","basis","vectors","as","coefficients","."]
code: def test_with_pauli_basis(self, num_wires):
      """Test that the generators of all possible ``PauliRot`` gates are correctly decomposed
      into canonical basis vectors as coefficients."""
      # generators of PauliRot
      paulirot_gens = -0.5j * pauli_basis_matrices(num_wires)
      # With many entries, each containing one basis element
      paulirot_coeffs = _one_parameter_paulirot_coeffs(
          paulirot_gens, num_wires
      )
      assert qml.math.allclose(
          paulirot_coeffs, np.eye(4**num_wires - 1)
      )
      # With a "single entry" containing all basis elements
      paulirot_coeffs = _one_parameter_paulirot_coeffs(
          [paulirot_gens], num_wires
      )
      assert qml.math.allclose(
          paulirot_coeffs, np.eye(4**num_wires - 1)
      )
  
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 2 for calling the TestOneParameterPauliRotCoeffs obj's underlying member method code with example usage: obj.test_with_pauli_basis(num_wires) without return types