class_docstr: Layers consisting of single qubit rotations and entanglers, inspired by the circuit-centric classifier design
  `arXiv:1804.00633 <https://arxiv.org/abs/1804.00633>`_.
  
  The argument ``weights`` contains the weights for each layer. The number of layers :math:`L` is therefore derived
  from the first dimension of ``weights``.
  
  The 2-qubit gates, whose type is specified by the ``imprimitive`` argument,
  act chronologically on the :math:`M` wires, :math:`i = 1,...,M`. The second qubit of each gate is given by
  :math:`(i+r)\mod M`, where :math:`r` is a  hyperparameter called the *range*, and :math:`0 < r < M`.
  If applied to one qubit only, this template will use no imprimitive gates.
  
  This is an example of two 4-qubit strongly entangling layers (ranges :math:`r=1` and :math:`r=2`, respectively) with
  rotations :math:`R` and CNOTs as imprimitives:
  
  .. figure:: ../../_static/layer_sec.png
      :align: center
      :width: 60%
      :target: javascript:void(0);
  
  .. note::
      The two-qubit gate used as the imprimitive or entangler must not depend on parameters.
  
  Args:
  
      weights (tensor_like): weight tensor of shape ``(L, M, 3)``
      wires (Iterable): wires that the template acts on
      ranges (Sequence[int]): sequence determining the range hyperparameter for each subsequent layer; if ``None``
                              using :math:`r=l \mod M` for the :math:`l` th layer and :math:`M` wires.
      imprimitive (type of pennylane.ops.Operation): two-qubit gate to use, defaults to :class:`~pennylane.ops.CNOT`
  
  Example:
  
      There are multiple arguments that the user can use to customize the layer.
  
      The required arguments are ``weights`` and ``wires``.
  
      .. code-block:: python
  
          dev = qml.device('default.qubit', wires=4)
  
          @qml.qnode(dev)
          def circuit(parameters):
              qml.StronglyEntanglingLayers(weights=parameters, wires=range(4))
              return qml.expval(qml.PauliZ(0))
  
          shape = qml.StronglyEntanglingLayers.shape(n_layers=2, n_wires=4)
          weights = np.random.random(size=shape)
  
      The shape of the ``weights`` argument decides the number of layers.
  
      The resulting circuit is:
  
      >>> print(qml.draw(circuit, expansion_strategy="device")(weights))
      0: ──Rot(0.68,0.98,0.48)─╭●───────╭X──Rot(0.94,0.22,0.70)─╭●────╭X────┤  <Z>
      1: ──Rot(0.91,0.19,0.15)─╰X─╭●────│───Rot(0.50,0.20,0.63)─│──╭●─│──╭X─┤
      2: ──Rot(0.91,0.68,0.96)────╰X─╭●─│───Rot(0.14,0.05,0.16)─╰X─│──╰●─│──┤
      3: ──Rot(0.46,0.56,0.80)───────╰X─╰●──Rot(0.87,0.04,0.22)────╰X────╰●─┤
  
      The default two-qubit gate used is :class:`~pennylane.ops.CNOT`. This can be changed by using the ``imprimitive`` argument.
  
      The ``ranges`` argument takes an integer sequence where each element
      determines the range hyperparameter for each layer. This range hyperparameter
      is the difference of the wire indices representing the two qubits the
      ``imprimitive`` gate acts on. For example, for ``range=[2,3]`` the
      first layer will have a range parameter of ``2`` and the second layer will
      have a range parameter of ``3``.
      Assuming ``wires=[0, 1, 2, 3]`` and a range parameter of ``2``, there will be
      an imprimitive gate acting on:
  
      * qubits ``(0, 2)``;
      * qubits ``(1, 3)``;
      * qubits ``(2, 0)``;
      * qubits ``(3, 1)``.
  
      .. code-block:: python
  
          dev = qml.device('default.qubit', wires=4)
  
          @qml.qnode(dev)
          def circuit(parameters):
              qml.StronglyEntanglingLayers(weights=parameters, wires=range(4), ranges=[2, 3], imprimitive=qml.ops.CZ)
              return qml.expval(qml.PauliZ(0))
  
          shape = qml.StronglyEntanglingLayers.shape(n_layers=2, n_wires=4)
          weights = np.random.random(size=shape)
  
      The resulting circuit is:
  
      >>> print(qml.draw(circuit, expansion_strategy="device")(weights))
      0: ──Rot(0.99,0.17,0.12)─╭●────╭Z──Rot(0.02,0.94,0.57)──────────────────────╭●─╭Z───────┤  <Z>
      1: ──Rot(0.55,0.42,0.61)─│──╭●─│──╭Z────────────────────Rot(0.15,0.26,0.82)─│──╰●─╭Z────┤
      2: ──Rot(0.79,0.93,0.27)─╰Z─│──╰●─│─────────────────────Rot(0.73,0.01,0.44)─│─────╰●─╭Z─┤
      3: ──Rot(0.30,0.74,0.93)────╰Z────╰●────────────────────Rot(0.57,0.50,0.80)─╰Z───────╰●─┤
  
  .. details::
      :title: Usage Details
  
      **Parameter shape**
  
      The expected shape for the weight tensor can be computed with the static method
      :meth:`~.qml.StronglyEntanglingLayers.shape` and used when creating randomly
      initialised weight tensors:
  
      .. code-block:: python
  
          shape = qml.StronglyEntanglingLayers.shape(n_layers=2, n_wires=2)
          weights = np.random.random(size=shape)
docstr: Returns the expected shape of the weights tensor.
  
  Args:
      n_layers (int): number of layers
      n_wires (int): number of wires
  
  Returns:
      tuple[int]: shape
docstr_tok: ["Returns","the","expected","shape","of","the","weights","tensor",".","Args",":","n_layers","(","int",")",":","number","of","layers","n_wires","(","int",")",":","number","of","wires","Returns",":","tuple","[","int","]",":","shape"]
code: def shape(n_layers, n_wires):
      r"""Returns the expected shape of the weights tensor.
  
      Args:
          n_layers (int): number of layers
          n_wires (int): number of wires
  
      Returns:
          tuple[int]: shape
      """
  
      return n_layers, n_wires, 3
  
imports: import pennylane
  from pennylane.operation import Operation, AnyWires
label_desc: Use image node_id 4 for calling the StronglyEntanglingLayers obj's underlying member method code with example usage: obj.shape(n_layers, n_wires) and returns: n_layers,  n_wires,  int