function 2: and
and:
description:
and(ket1, ket2)
returns |yes> if ket1 and ket2 are |yes>, |no> otherwise.
now implemented as: ( ket1 && ket2 )
examples:
and(|yes>, |yes>)
|yes>
and(|yes>, |no>)
|no>
and(|no>, |no>)
|no>
see also:
or, xor
and:
description:
and(ket) input-seq
applies and(ket, x) for each x in input-seq
as such, it preserves input-seq structure
but, because it preserves input-seq structure, it is slower than the above version.
examples:
and(|yes>) (|no> . |yes>)
|no> . |yes>
see also:
or, xor
Home