class_docstr: A bookkeeping class for wires, which are ordered collections of unique objects.
  
  If the input `wires` can be iterated over, it is interpreted as a sequence of wire labels that have to be
  unique and hashable. Else it is interpreted as a single wire label that has to be hashable. The
  only exception are strings which are interpreted as wire labels.
  
  The hash function of a wire label is considered the source of truth when deciding whether
  two wire labels are the same or not.
  
  Indexing an instance of this class will return a wire label.
  
  .. warning::
  
      In order to support wire labels of any hashable type, integers and 0-d arrays are considered different.
      For example, running ``qml.RX(1.1, qml.numpy.array(0))`` on a device initialized with ``wires=[0]``
      will fail because ``qml.numpy.array(0)`` does not exist in the device's wire map.
  
  Args:
       wires (Any): the wire label(s)
class_docstr_tok: ["A","bookkeeping","class","for","wires",",","which","are","ordered","collections","of","unique","objects",".","If","the","input","`","wires","`","can","be","iterated","over",",","it","is","interpreted","as","a","sequence","of","wire","labels","that","have","to","be","unique","and","hashable",".","Else","it","is","interpreted","as","a","single","wire","label","that","has","to","be","hashable",".","The","only","exception","are","strings","which","are","interpreted","as","wire","labels",".","The","hash","function","of","a","wire","label","is","considered","the","source","of","truth","when","deciding","whether","two","wire","labels","are","the","same","or","not",".","Indexing","an","instance","of","this","class","will","return","a","wire","label",".","..","warning",":",":","In","order","to","support","wire","labels","of","any","hashable","type",",","integers","and","0-d","arrays","are","considered","different",".","For","example",",","running","``","qml.RX","(","1.1",",","qml.numpy.array","(","0",")",")","``","on","a","device","initialized","with","``","wires=","[","0","]","``","will","fail","because","``","qml.numpy.array","(","0",")","``","does","not","exist","in","the","device","'s","wire","map",".","Args",":","wires","(","Any",")",":","the","wire","label","(","s",")"]
docstr: Returns a randomly sampled subset of Wires of length 'n_samples'.
  
  Args:
      n_samples (int): number of subsampled wires
      seed (int): optional random seed used for selecting the wires
  
  Returns:
      Wires: random subset of wires
docstr_tok: ["Returns","a","randomly","sampled","subset","of","Wires","of","length","'n_samples","'",".","Args",":","n_samples","(","int",")",":","number","of","subsampled","wires","seed","(","int",")",":","optional","random","seed","used","for","selecting","the","wires","Returns",":","Wires",":","random","subset","of","wires"]
code: def select_random(self, n_samples, seed=None):
      """
      Returns a randomly sampled subset of Wires of length 'n_samples'.
  
      Args:
          n_samples (int): number of subsampled wires
          seed (int): optional random seed used for selecting the wires
  
      Returns:
          Wires: random subset of wires
      """
  
      if n_samples > len(self._labels):
          raise WireError(
              f"Cannot sample {n_samples} wires from {len(self._labels)} wires."
          )
  
      rng = np.random.default_rng(seed)
  
      indices = rng.choice(
          len(self._labels), size=n_samples, replace=False
      )
      subset = tuple(self[i] for i in indices)
      return Wires(subset, _override=True)
  
imports: import functools
  import itertools
  from collections.abc import Iterable, Sequence
  import numpy
  from pennylane.pytrees import register_pytree
label_desc: Use image node_id 23 for calling the Wires obj's underlying member method code with example usage: obj.select_random(n_samples, seed) and returns: Wires