<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def die_program(number_of_sides):
 """ Generate a quantum program to roll a die of n faces. """

    prog = Program()
    n_qubits = qubits_needed(number_of_sides)
    ro = prog.declare('ro', 'BIT', n_qubits)
    # Hadamard initialize.
    for q in range(n_qubits):
        prog.inst(H(q))
    # Measure everything.
    for q in range(n_qubits):
        prog.measure(q, ro[q])
    return prog