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

[QOSF Question] Transition guide from Qiskit/Cirq to Q# #1746

Open
Manvi-Agrawal opened this issue Jul 17, 2024 · 3 comments
Open

[QOSF Question] Transition guide from Qiskit/Cirq to Q# #1746

Manvi-Agrawal opened this issue Jul 17, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@Manvi-Agrawal
Copy link
Contributor

Today, in QOSF presentation meeting, there was interest in resources for learning Q#. In general, documentation, samples and katas help. I also pointed them to "Q# pocket guide" and upcoming "Quantum Programming in Depth : Solving problems with Q# and Qiskit" book by Mariia.

Someone asked if there is a transition guide from Qiskit/Cirq to Q#, since these are primarily taught in universities. I tried searching the documentation but couldnt find it. Does anyone know about it?

@Manvi-Agrawal Manvi-Agrawal added enhancement New feature or request needs triage labels Jul 17, 2024
@tcNickolas
Copy link
Contributor

I don't recall ever seeing a guide like that, but that's an interesting idea!

There was an automatic OpenQASM to Q# converter at https://github.com/qsharp-community/qsharp-integrations, but it is so old, it probably doesn't work.

When I need code in multiple languages, I tend to write it in Q# first and then translate to other languages (well, to Qiskit). In this case, the main issues are:

  1. Local qubit allocation - Qiskit circuits need to have all qubits declared upfront, so counting auxiliary qubits is tricky.
  2. Endianness differences
  3. Mid-circuit measurements (and generally processing of measurement results, those look very different)

In the other direction, if Qiskit code uses libraries that are not available in Q# - either quantum or classical Python - that will be a massive problem for migration.

@Manvi-Agrawal
Copy link
Contributor Author

Manvi-Agrawal commented Jul 23, 2024

Thanks @tcNickolas for providing more insights into Q# and Qiskit. I think the spirit of the question was that since Qiskit is widely used, people were asking if there is a cheatsheet/documentation to get started with Q# quickly if someone is familiar with Qiskit.

This is because Q# differs widely from Qiskit, Cirq and others, so people find it hard to try Q# because of learning curve. Personally speaking, I think Q# is good to learn afresh for someone familiar with programming. I found it more intuitive than Qiskit, some aspects being dynamic auxillary qubits handling, no need to have classical register for measurements, etc. But once I got used to Qiskit in university, there was a mental roadblock to adopt Q# again, had to dive in document and samples a bit :-)

@sezna sezna added documentation Improvements or additions to documentation and removed needs triage enhancement New feature or request labels Aug 15, 2024
@sezna
Copy link
Contributor

sezna commented Aug 15, 2024

We may consider this for learn.microsoft.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants