concept bit in category quantum computing

This is an excerpt from Manning's book Quantum Computing for Developers: A Java-based introduction.
In a classical computer, a bit is smallest piece of information, and it can be either 0 or 1. Different operations are possible on those bits, and bits can be altered or combined. At any moment though, all bits in a computer are in a clear state: 0 or 1. The physical analogy of a classical bit is related to current. A "0" state corresponds with no current, and a "1" state corresponds with current.
All existing classical software development is based on the manipulations of those bits. Using combinations of bits, and applying gate operations of bits is the essence of classical software development. We will discuss this in more detail in Chapter 3.
We started Chapter 6 by showing how classical networks are used to send classical information from one node (or computer) to another. We explained how different pieces of information travel from Java applications to a low level implementation, where they are sent as bits to the other node, and travel upwards again. This is shown in Figure 8.1.
Alice sent 0 and Bob received 0 Alice sent 1 and Bob received 1 Alice sent 0 and Bob received 0 Alice sent 0 and Bob received 0

This is an excerpt from Manning's book Learn Quantum Computing with Python and Q#.
When learning about the concepts of quantum mechanics, it can often be helpful to step back and re-examine classical concepts in a way that makes it easier to make the connection to how that concept is expressed in quantum computing. With that in mind, let’s step back and take another look at what bits are.
Visualizing classical bits this way also lets us extend our notion of bits slightly to include a way to describe random bits (which will be helpful later). If we have a fair coin (that is, a coin that lands heads "half" of the time and "tails" the other half), then it wouldn’t be correct to call that coin a "0" or a "1". We only know what bit value our coin bit has if we set it with a particular side face up on a surface, or we can flip it for a random bit value. Every time we flip a coin, we know that eventually it will land and we will get a heads or tails. Whether it lands heads or tails is governed by a probability called the bias of the coin. We have to pick a side of the coin to describe the bias, which is easy to phrase as a question like this: What is the probability the coin will land heads? Thus a fair coin would have a bias of 50% because it lands with the value heads half of the time, which is mapped to the bit value 0 in .
Figure 2.6. Extending the concept of a bit to describe a coin, which has a probability of being found in either "0" or "1" each time it is flipped.
![]()
Listing 3.9. Some helper functions before we get to the full BB84 key exchange.
def sample_random_bit(device: QuantumDevice) -> bool: with device.using_qubit() as q: q.h() result = q.measure() q.reset() #1 return result def prepare_message_qubit(message: bool, basis: bool, q: Qubit) -> None: #2 if message: q.x() if basis: q.h() def measure_message_qubit(basis: bool, q: Qubit) -> bool: if basis: q.h() result = q.measure() q.reset() #3 return result def convert_to_hex(bits: List[bool]) -> str: #4 return hex(int( "".join(["1" if bit else "0" for bit in bits]), 2 ))