Partager via


Opération ApplyXorInPlace

Nom complet : Std.Canon.ApplyXorInPlace

operation ApplyXorInPlace(value : Int, target : Qubit[]) : Unit is Adj + Ctl

Résumé

Applique une opération XOR au niveau du bit entre un entier classique et un entier représenté par un registre de qubits.

Description

Applique X opérations aux qubits d’un registre little-endian basé sur 1 bits dans un entier.

Notons value par un entier non signé encodé dans target, puis ApplyXorInPlace effectue une opération donnée par la carte suivante : |y⟩ ↦ |y ⊕ a⟩, où ⊕ est l’opérateur OR exclusif au niveau du bit.