function 2: sum


sum:
    description:
        sum(seq, seq)
        the sum function, takes element-wise sum of the coefficients

    examples:
        -- sequence sum example:
        sum( ssplit |abcdefg>, ssplit |abxyz>)
            2|a> . 2|b> . |c> + |x> . |d> + |y> . |e> + |z> . |f> . |g>

    see also:
        intersection, union, is-subset, is-mbr, simm

Home