Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use more efficient runtime #3

Open
Lynzzyr opened this issue May 6, 2024 · 8 comments
Open

Use more efficient runtime #3

Lynzzyr opened this issue May 6, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request

Comments

@Lynzzyr
Copy link
Collaborator

Lynzzyr commented May 6, 2024

The leading quantum computing SDK/library is Qiskit by IBM. However it is a Python library. There are some undocumented ways to use C++ with Qiskit, but generally it is for Python. Preferably the backend runtime should be coded in a more efficient language such as the aforementioned C++ or even god forbid Rust. While Qiskit isn't available for these languages, here are some other libraries for other languages:

Qulacs - C++ (most popular for C++)
Quantum++ - C++
RustQIP - Rust
Quantum - Rust

@Lynzzyr Lynzzyr added the enhancement New feature or request label May 6, 2024
@bulutthecat
Copy link

Currently working on this, I have decided to go with rust.
I am not switching the Quantum lang yet, as that will come in the future.
but I have implemented the json parsing and python output in rust.
needs further testing.

@logandhillon
Copy link
Collaborator

@bulutthecat Please make sure you are not directly committing to main. I have reverted your commit on main and left your branch alone, however, we want to keep main as the working branch.

When you're done, make a PR instead.

@Lynzzyr
Copy link
Collaborator Author

Lynzzyr commented May 6, 2024

While a compiler written in Rust may be a smidge faster, ultimately a Python compiler would be more practical as it has virtually no performance drawbacks and Rust may in fact be a hinderance in terms of the host machine and the person working on the script.

This issue is meant to actually run the quantum code in another language besides Python. I will be working on this and I may use the Rust compiler or not. Probably not though.

@bulutthecat
Copy link

@bulutthecat Please make sure you are not directly committing to main. I have reverted your commit on main and left your branch alone, however, we want to keep main as the working branch.

When you're done, make a PR instead.

The changes I have pushed to main, I have made sure to not interfere with the main frontend/backend. As well as rigorously tested to make sure no existing code in main was modified.
Please let me know before you make a change like that.

@bulutthecat
Copy link

While a compiler written in Rust may be a smidge faster, ultimately a Python compiler would be more practical as it has virtually no performance drawbacks and Rust may in fact be a hinderance in terms of the host machine and the person working on the script.

This issue is meant to actually run the quantum code in another language besides Python. I will be working on this and I may use the Rust compiler or not. Probably not though.

Yes, currently Python is fine for that, our compiler needs to be well optimized for RAM usage though, as each user query will be going through it.
Python has proven to use alot of RAM, something which cannot be particularly reserved at scale, for each user request, and JIT isnt fast enough for our usecase.

As for moving to Rust or C++ for our compiled code, It would be easier to use native Qiskit instead of a subsidiary/intermediary language.

@Lynzzyr
Copy link
Collaborator Author

Lynzzyr commented May 6, 2024

Okay I will look into your suggestions however note that those mentioned libraries are not intermediary languages for Qiskit and are instead fully fledged quantum SDKs as far as my knowledge covers.

For now @bulutthecat you don't need to worry about this.

@bulutthecat
Copy link

Okay I will look into your suggestions however note that those mentioned libraries are not intermediary languages for Qiskit and are instead fully fledged quantum SDKs as far as my knowledge covers.

For now @bulutthecat you don't need to worry about this.

Thats fine, you focus on making an example script in one of those languages, and then we can both work on porting our qupython code compiler over.
All of those are fine options, get back to me when you can finalize that, and we can both work on it.
for now, I am going to keep this open until we can decide on what language to use.

@logandhillon
Copy link
Collaborator

The changes I have pushed to main, I have made sure to not interfere with the main frontend/backend. As well as rigorously tested to make sure no existing code in main was modified. Please let me know before you make a change like that.

Hi, please be aware that no one should commit directly to main, instead, make a branch and PR into main. I'm sure you're aware of this, so no worries.

@Lynzzyr Lynzzyr changed the title Use more efficient language for backend runtime Use more efficient runtime May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants