CopyMostSignificantBit operation

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Arithmetic

Package: Microsoft.Quantum.Standard

Copies the most significant bit of a qubit register from representing an unsigned integer into the qubit target.

operation CopyMostSignificantBit (from : Microsoft.Quantum.Arithmetic.LittleEndian, target : Qubit) : Unit is Adj

Input

from : LittleEndian

The unsigned integer from which the highest bit is copied from. the integer is encoded in little-endian format.

target : Qubit

The qubit in which the highest bit is being copied. The bit encoding is in computational basis.

Output : Unit

See Also