code: def sin(d, alpha=1.0, phase=0.0):
      
      cr = []
      cur_core = _np.zeros([1, 2, 2], dtype=_np.float)
      cur_core[0, 0, :] = [_math.cos(phase), _math.sin(phase)]
      cur_core[0, 1, :] = [_math.cos(alpha + phase), _math.sin(alpha + phase)]
      cr.append(cur_core)
      for i in xrange(1, d - 1):
          cur_core = _np.zeros([2, 2, 2], dtype=_np.float)
          cur_core[0, 0, :] = [1.0, 0.0]
          cur_core[1, 0, :] = [0.0, 1.0]
          cur_core[
          0,
          1,
          :] = [
              _math.cos(
                  alpha *
                  2 ** i),
              _math.sin(
                  alpha *
                  2 ** i)]
          cur_core[1,
          1,
          :] = [-_math.sin(alpha * 2 ** i),
                _math.cos(alpha * 2 ** i)]
          cr.append(cur_core)
      cur_core = _np.zeros([2, 2, 1], dtype=_np.float)
      cur_core[0, :, 0] = [0.0, _math.sin(alpha * 2 ** (d - 1))]
      cur_core[1, :, 0] = [1.0, _math.cos(alpha * 2 ** (d - 1))]
      cr.append(cur_core)
      return _vector.vector.from_list(cr)
docs: Create TT-vector for :math:`\\sin(\\alpha n + \\varphi)`.