Пример #1
0
def measure_message_qubit(basis: bool, q: Qubit):
    if basis:
        q.h()
    result = q.measure()
    return result
Пример #2
0
def prepare_message_qubit(message: bool, basis: bool, q: Qubit):
    if message:
        q.x()
    if basis:
        q.h()