built in operators: rotate-right


rotate-right:
    description:
        rotate-right input-seq
        rotate each superposition in input-seq right by 1 step

        rotate-right[n] input-seq
        rotate each superposition in input-seq right by n steps, modulus by the size of the corresponding superposition

    examples:
        rotate-right (|one> + |two> + |three> + |four> + |five> + |six> + |seven>)
            |seven> + |one> + |two> + |three> + |four> + |five> + |six>

        rotate-right[3] (|one> + |two> + |three> + |four> + |five> + |six> + |seven>)
            |five> + |six> + |seven> + |one> + |two> + |three> + |four>

    see also:
        rotate-left, srotate-right, srotate-left
Home