built in operators: sdrop


sdrop:
    description:
        sdrop seq
        drop all kets with coeff <= 0 from the given sequence
        including empty kets

    examples:
        sdrop (|a> . |> . 0|b> . -3 |c> . |d> . |x> + |y>)
            |a> . |d> . |x> + |y>

        sdrop (|a> + 0|b> -3|c> + |d> . |> . |x> + |y> + |z>)
            |a> + |d> . |x> + |y> + |z>

    see also:
        drop, drop-below, drop-above

Home