The LittleEndian
type is basically a wrapper for a register of qubits to let the user know how to interpret it as another value. It changes nothing about the register it wraps.
- There is no fixed number of bits in a
LittleEndian
, it only documents that the least significant bit of a register is index 0 (on the left).
- If you want to get back just the register not wrapped in the
LittleEndian
type, you can use the !
operator like this:
using (register = LittleEndian(Qubit[3]) {
ResetAll(register!);
}
- Similar to #2 if you us
!
to unwrap the LittleEndian
type you can then index it like normal.
- Same as #3, just unwrap the type and you should be able to do the gates as you would regularly. The controlled functor may be of use to you.
I also have a section in my book that talks about how to use UDTs or User Defined Types which LittleEndian
is an example of (provided by the Numerics library)