class_docstr: Abstract base class for PennyLane devices.
  
  Args:
      wires (int or Iterable[Number, str]]): Number of subsystems represented by the device,
          or iterable that contains unique labels for the subsystems as numbers (i.e., ``[-1, 0, 2]``)
          or strings (``['ancilla', 'q1', 'q2']``). Default 1 if not specified.
      shots (int): Number of circuit evaluations/random samples used to estimate
          expectation values of observables. Defaults to 1000 if not specified.
class_docstr_tok: ["Abstract","base","class","for","PennyLane","devices",".","Args",":","wires","(","int","or","Iterable","[","Number",",","str","]","]",")",":","Number","of","subsystems","represented","by","the","device",",","or","iterable","that","contains","unique","labels","for","the","subsystems","as","numbers","(","i.e.",",","``","[","-1",",","0",",","2","]","``",")","or","strings","(","``","[","'ancilla","'",",","'q1","'",",","'q2","'","]","``",")",".","Default","1","if","not","specified",".","shots","(","int",")",":","Number","of","circuit","evaluations\/random","samples","used","to","estimate","expectation","values","of","observables",".","Defaults","to","1000","if","not","specified","."]
docstr: Returns the variance of observable on specified wires.
  
  Note: all arguments support _lists_, which indicate a tensor
  product of observables.
  
  Args:
      observable (str or list[str]): name of the observable(s)
      wires (Wires): wires the observable(s) is to be measured on
      par (tuple or list[tuple]]): parameters for the observable(s)
  
  Raises:
      NotImplementedError: if the device does not support variance computation
  
  Returns:
      float: variance :math:`\mathrm{var}(A) = \bra{\psi}A^2\ket{\psi} - \bra{\psi}A\ket{\psi}^2`
docstr_tok: ["Returns","the","variance","of","observable","on","specified","wires",".","Note",":","all","arguments","support","_lists_",",","which","indicate","a","tensor","product","of","observables",".","Args",":","observable","(","str","or","list","[","str","]",")",":","name","of","the","observable","(","s",")","wires","(","Wires",")",":","wires","the","observable","(","s",")","is","to","be","measured","on","par","(","tuple","or","list","[","tuple","]","]",")",":","parameters","for","the","observable","(","s",")","Raises",":","NotImplementedError",":","if","the","device","does","not","support","variance","computation","Returns",":","float",":","variance",":","math",":","`","\\mathrm","{","var","}","(","A",")","=","\\bra","{","\\psi","}","A^2\\ket","{","\\psi","}","-","\\bra","{","\\psi","}","A\\ket","{","\\psi","}","^2","`"]
code: def var(self, observable, wires, par):
      r"""Returns the variance of observable on specified wires.
  
      Note: all arguments support _lists_, which indicate a tensor
      product of observables.
  
      Args:
          observable (str or list[str]): name of the observable(s)
          wires (Wires): wires the observable(s) is to be measured on
          par (tuple or list[tuple]]): parameters for the observable(s)
  
      Raises:
          NotImplementedError: if the device does not support variance computation
  
      Returns:
          float: variance :math:`\mathrm{var}(A) = \bra{\psi}A^2\ket{\psi} - \bra{\psi}A\ket{\psi}^2`
      """
      raise NotImplementedError(
          f"Returning variances from QNodes not currently supported by {self.short_name}"
      )
  
imports: import abc
  import copy
  import types
  import warnings
  from collections import OrderedDict
  from collections.abc import Iterable, Sequence
  from functools import lru_cache
  import numpy
  import pennylane
  from pennylane.measurements import MeasurementProcess, CountsMP, Expectation, ExpectationMP, MidMeasureMP, Probability, ProbabilityMP, Sample, SampleMP, ShadowExpvalMP, State, Variance
  from pennylane.operation import Observable, Operation, Tensor, Operator, StatePrepBase
  from pennylane.ops import Hamiltonian, Sum
  from pennylane.tape import QuantumScript, QuantumTape, expand_tape_state_prep
  from pennylane.wires import WireError, Wires
  from pennylane.queuing import QueuingManager
label_desc: Use image node_id 45 for calling the Device obj's underlying member method code with example usage: obj.var(observable, wires, par) without return types