class_docstr: A controlled mod gate.
  
  This is black box controlled Mod function for use by shor's algorithm.
  TODO: implement a decompose property that returns how to do this in terms
  of elementary gates
class_docstr_tok: ["A","controlled","mod","gate",".","This","is","black","box","controlled","Mod","function","for","use","by","shor","'s","algorithm",".","TODO",":","implement","a","decompose","property","that","returns","how","to","do","this","in","terms","of","elementary","gates"]
docstr: N is the type of modular arithmetic we are doing.
docstr_tok: ["N","is","the","type","of","modular","arithmetic","we","are","doing","."]
code: def N(self):
      """N is the type of modular arithmetic we are doing."""
      return self.label[2]
  
imports: import math
  import random
  from sympy.core.mul import Mul
  from sympy.core.singleton import S
  from sympy.functions.elementary.exponential import log
  from sympy.functions.elementary.miscellaneous import sqrt
  from sympy.core.intfunc import igcd
  from sympy.ntheory import continued_fraction_periodic
  from sympy.utilities.iterables import variations
  from sympy.physics.quantum.gate import Gate
  from sympy.physics.quantum.qubit import Qubit, measure_partial_oneshot
  from sympy.physics.quantum.qapply import qapply
  from sympy.physics.quantum.qft import QFT
  from sympy.physics.quantum.qexpr import QuantumError
label_desc: Use image node_id 4 for calling the CMod obj's underlying member method code with example usage: obj.N() and returns: self