'Returns the index of state in basis.
Examples
>>> from sympy.physics.secondquant import FixedBosonicBasis
>>> b = FixedBosonicBasis(2, 3)
>>> b.index(b.state(3))
3'

def index(self, state):

    return self.basis.index(state)
