次の方法で共有


ApplyIfEqualLE 操作

完全修飾名: Std.Arithmetic.ApplyIfEqualLE

operation ApplyIfEqualLE<'T>(action : ('T => Unit is Adj + Ctl), x : Qubit[], y : Qubit[], target : 'T) : Unit is Adj + Ctl

概要

if x == y { action(target) }を計算します。つまり、レジスタ action がレジスタ targetと等しい場合、xy が適用されます。 両方の量子ビット レジスタは、リトル エンディアン形式である必要があります。