Xanadu Quantum Codebook H.7.3

Codercise H.7.3. Use the PREPARE and SELECT procedures you defined above to generate superpositions of two-qubit computational basis states,

    U_list = [np.kron(qml.PauliZ.matrix, qml.PauliZ.matrix), np.kron(qml.PauliZ.matrix,qml.PauliX.matrix), np.kron(qml.PauliX.matrix,qml.PauliZ.matrix), np.kron(qml.PauliX.matrix,qml.PauliX.matrix)]

    qml.QubitUnitary(PREPARE(beta_list**2), wires=aux)
    SELECT(U_list)



    return qml.state()

beta_list = np.array([1, 0, 0, 1])
normalized_coefficients = [quantum_memory(beta_list)[i].item() for i in range(0, 20, 5)]
print("The amplitudes on the main register are proportional to", normalized_coefficients, ".")

Error: unsupported operand type(s) for *: ‘function’ and ‘function’

I don’t understand why this error is there?

Hey @Monit_Sharma,

The answer to your last forum post is relevant here as well: Exercise H.6.1(b)

Hope that helps!