mpsprep.helpers.bit_string
- mpsprep.helpers.bit_string(nqubits, decimal)[source]
Returns a binary string that is nqubits wide, with the least significant bit at the right.
- Parameters
- nqubitsint
Number of qubits. This is necessary to determine the width of the bit string.
- decimalint
Decimal integer between 0 and 2**nqubits - 1 to convert into a binary bit string.
- Returns
- outstring
Binary bit string of decimal with the least significant bit at the right.