[][src]Module qip::utils

Commonly used short functions.

Functions

entwine_bits

Mixes two bitstreams, z_bits and o_bits, takes one bit off the lowest position from each to construct the output, selector is used to choose which to use. 0 indices z_bits a

extract_bits

Extracts bits from a number in a particular order.

flip_bits

Flips the bits in num from ith position to (n-i)th position.

get_bit

Get the bit_index bit value from num.

get_flat_index

Get the index into an Op matrix

set_bit

Set the bit_index bit in num to value.