-
Notifications
You must be signed in to change notification settings - Fork 33
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
✨♻️ Refactor QuantumComputation
API and Expose to Python
#371
Conversation
…pose-optype-in-python
Also exposed relevant types directly into `mqt.core`.
@pehamTom many thanks for working on this; much appreciated help! Once the To this end, I would like to introduce a certain separation of concerns between the core library and its extensions (like the adapter to Qiskit). This allows us to set a precedent for how to provide adapters from the MQT to other toolkits and should keep the code rather modular. I hope this makes sense. If you do not agree with something or something is not clear, let's discuss. Edit: I also references two issues that are closed by this PR. The first is essentially just the binding of the |
…pose-optype-in-python
…pose-optype-in-python
Also updated `__init__.pyi`
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Cpp-Linter Report ✔️No problems need attention. Have any feedback or feature suggestions? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the size of the PR and the scope of the changes, this looks good to me. I am probably going to be the first user of this when I try to adapt QMAP so I will take care of any issues that arise in the process. If there is nothing further to discuss, I would say this is ready to merge. And thanks for all the help and refactoring!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright. In that case, let's go.
Thanks for this great and important contribution!
QuantumComputation
to Python
QuantumComputation
to PythonQuantumComputation
API and Expose to Python
Description
To make mqt-core accessible from python - in particular to make commonly used mqt-core methods and datatypes available to other mqt tools in python - this PR aims to port the core functionality to python.
This PR does not aim to provide every functionality available in the C++ library to python. This is left for future changes when the demand for such functionality arises.
In the process, some of the interfaces of the
QuantumComputation
class where adjusted drastically.This constitutes a breaking change and will require consuming libraries to adapt.
However, it greatly simplifies some constructions and makes the interface way cleaner.
In particular,
QuantumComputation
class was switched to be more natural and in-line with what other SDKs are providing. The same convenience functions were given more suitable names to indicate their functionality (e.g.,x
,cx
, andmcx
). Lots of boilerplate code was reduced and refactored.Control
objects are now implicitly constructible fromQubit
indices which, again, simplifies a lot of constructsclone
methods.Last, but certainly not least, this PR also adds full API documentation for the exposed functionality and a Quickstart Guide to get started.
Checklist: