class_docstr: Test that one qubit unitaries are correctly decomposed.
class_docstr_tok: ["Test","that","one","qubit","unitaries","are","correctly","decomposed","."]
docstr: Test that a one-qubit matrix in isolation is correctly decomposed to RZ or Rot gate.
docstr_tok: ["Test","that","a","one-qubit","matrix","in","isolation","is","correctly","decomposed","to","RZ","or","Rot","gate","."]
code: def test_one_qubit_decomposition_rot(
      self, U, expected_gates, expected_params
  ):
      """Test that a one-qubit matrix in isolation is correctly decomposed to RZ or Rot gate."""
  
      _test_decomposition(U, "rot", expected_gates, expected_params)
  
imports: from functools import reduce
  import pytest
  from gate_data import I, Z, S, T, H, X, Y, CNOT, SWAP
  import pennylane
  from pennylane import numpy
  from pennylane.wires import Wires
  from pennylane.ops.op_math.decompositions import one_qubit_decomposition
  from pennylane.ops.op_math.decompositions import two_qubit_decomposition
  from pennylane.ops.op_math.decompositions.two_qubit_unitary import _convert_to_su4, _su2su2_to_tensor_products, _compute_num_cnots
label_desc: Use image node_id 2 for calling the TestOneQubitRotDecomposition obj's underlying member method code with example usage: obj.test_one_qubit_decomposition_rot(U, expected_gates, expected_params) without return types