class_docstr: Test that the template defines the correct decomposition.
class_docstr_tok: ["Test","that","the","template","defines","the","correct","decomposition","."]
docstr: Test the correctness of the wire indices for the generalized singles and paired doubles excitaitons
  used by the template.
docstr_tok: ["Test","the","correctness","of","the","wire","indices","for","the","generalized","singles","and","paired","doubles","excitaitons","used","by","the","template","."]
code: def test_excitations_wires_kupccgsd(
      self,
      wires,
      delta_sz,
      generalized_singles_wires,
      generalized_pair_doubles_wires,
  ):
      """Test the correctness of the wire indices for the generalized singles and paired doubles excitaitons
      used by the template."""
  
      shape = qml.kUpCCGSD.shape(
          k=1, n_wires=len(wires), delta_sz=delta_sz
      )
      weights = np.pi / 2 * qml.math.ones(shape)
  
      ref_state = qml.math.array([1, 1, 0, 0])
  
      op = qml.kUpCCGSD(
          weights,
          wires=wires,
          k=1,
          delta_sz=delta_sz,
          init_state=ref_state,
      )
      gen_singles_wires, gen_doubles_wires = (
          op.hyperparameters["s_wires"],
          op.hyperparameters["d_wires"],
      )
  
      assert gen_singles_wires == generalized_singles_wires
      assert gen_doubles_wires == generalized_pair_doubles_wires
  
imports: import pytest
  import numpy
  import pennylane
label_desc: Use image node_id 4 for calling the TestDecomposition obj's underlying member method code with example usage: obj.test_excitations_wires_kupccgsd(wires, delta_sz, generalized_singles_wires, generalized_pair_doubles_wires) without return types