class_docstr: Immutable dictionary used to represent a Pauli Word,
  associating wires with their respective operators.
  Can be constructed from a standard dictionary.
  
  .. note::
  
      An empty :class:`~.PauliWord` will be treated as the multiplicative
      identity (i.e identity on all wires).
  
  **Examples**
  
  Initializing a Pauli word:
  
  >>> w = PauliWord({"a": 'X', 2: 'Y', 3: 'Z'})
  >>> w
  X(a) @ Y(2) @ Z(3)
  
  When multiplying Pauli words together we obtain the resulting word and the scalar coefficient.
  
  >>> w1 = PauliWord({0:"X", 1:"Y"})
  >>> w2 = PauliWord({1:"X", 2:"Z"})
  >>> w1 @ w2
  (Z(1) @ Z(2) @ X(0), -1j)
  
  We can multiply scalars to Pauli words or add/subtract them, resulting in a :class:`~PauliSentence` instance.
  
  >>> 0.5 * w1 - 1.5 * w2 + 2
  0.5 * X(0) @ Y(1)
  + -1.5 * X(1) @ Z(2)
  + 2 * I
class_docstr_tok: ["Immutable","dictionary","used","to","represent","a","Pauli","Word",",","associating","wires","with","their","respective","operators",".","Can","be","constructed","from","a","standard","dictionary",".","..","note",":",":","An","empty",":","class",":","`","~.PauliWord","`","will","be","treated","as","the","multiplicative","identity","(","i.e","identity","on","all","wires",")",".","*","*","Examples","*","*","Initializing","a","Pauli","word",":",">",">",">","w","=","PauliWord","(","{","``","a","''",":","'","X","'",",","2",":","'","Y","'",",","3",":","'","Z","'","}",")",">",">",">","w","X","(","a",")","@","Y","(","2",")","@","Z","(","3",")","When","multiplying","Pauli","words","together","we","obtain","the","resulting","word","and","the","scalar","coefficient",".",">",">",">","w1","=","PauliWord","(","{","0",":","''","X","''",",","1",":","''","Y","''","}",")",">",">",">","w2","=","PauliWord","(","{","1",":","''","X","''",",","2",":","''","Z","''","}",")",">",">",">","w1","@","w2","(","Z","(","1",")","@","Z","(","2",")","@","X","(","0",")",",","-1j",")","We","can","multiply","scalars","to","Pauli","words","or","add\/subtract","them",",","resulting","in","a",":","class",":","`","~PauliSentence","`","instance",".",">",">",">","0.5","*","w1","-","1.5","*","w2","+","2","0.5","*","X","(","0",")","@","Y","(","1",")","+","-1.5","*","X","(","1",")","@","Z","(","2",")","+","2","*","I"]
docstr: Subtract other PauliSentence, PauliWord, or scalar
docstr_tok: ["Subtract","other","PauliSentence",",","PauliWord",",","or","scalar"]
code: def __sub__(self, other):
      """Subtract other PauliSentence, PauliWord, or scalar"""
      return self + -1 * other
  
imports: import warnings
  from copy import copy
  from functools import reduce, lru_cache
  from typing import Iterable
  import numpy
  from scipy import sparse
  import pennylane
  from pennylane import math
  from pennylane.typing import TensorLike
  from pennylane.wires import Wires
  from pennylane.operation import Tensor
  from pennylane.ops import Hamiltonian, Identity, PauliX, PauliY, PauliZ, prod, s_prod
label_desc: Use image node_id 13 for calling the PauliWord obj's underlying member method code with example usage: obj.__sub__(other) and returns: unknown