lainchan / λ

(untitled)

Ivan Petrov · 2024-02-26 11:17
I need some help. I wrote a lottery number generator, but it's missing one final element to generate winning numbers. I've been trying to learn programming just to write this. The program that does the heavy lifting is in Python, but I have as well a quantum bit generator in Q# and it computes pseudo random quantum bits when the Q# code is run on my PC. But I want to know how can I set up a Quantum Azure instance, and have Python pass the calls to the Q# qubit function to an Azure instance that uses Microsoft's quantum computers. Here's a screenshot of my program and it works except the qubits are simulated and not actual qubits. I want to pass a call to an Azure instance that generates actual qubits instead of simulated qubits. Only I don't know how to do it. I'm willing to share it with someone that helps me. I also cast magical spells on it. It should already be powerful only my technical knowledge is lacking. Specifically, what I need help with is: I don't know how to even set up an Azure quantum instance, and then to actually call it with my Python program. I tried to and failed. I'm really clueless. The whole program is more than 250 lines of code. I'll post some snippets of the code in the replies. I have an Azure Quantum workspace, but can't use the Jupyter notebook option due to using tkinter for my GUI, and I can't use the web VSCode IDE to run my program because 99% of it is in Python. So, that leaves me the only option to run my Python code locally and then call the Q# code on an Azure, or other quantum service workspace. I found Azure CLI, but it's overly complicated and wy over my head https://learn.microsoft.com/en-gb/cli/azure/install-azure-cli-windows?tabs=azure-cli I also found this but it's complicated and I don't know how to use it https://github.com/microsoft/azure-quantum-python?tab=readme-ov-file I'm not a programmer, I am just trying to learn what I can to finish this one program. And I'm in over my head when it comes to working with cloud deployed systems. I'll post some snippets of my code to show how it works. In the following posts. My program is over 250 lines of code.
renames · 2024-02-26 11:30
The code that does the qubit generation, and the second one is Q# code
let · 2024-02-27 04:24
Is there a specific reason you want to use QC for this? For random numbers a CPRNG (like /dev/urandom for server-side) is way simpler, faster and just as good (i.e. completely unpredictable). QC is useful for performing specific computations that are very hard otherwise. There's no benefit when using it for RNGs only.
Wintermute · 2024-02-27 08:29
>>38439 Yeah, quantum number generation is special.