Closed Hanrui-Wang closed 1 year ago
Hi, I have added the code for SDG gate in functional.py, added a class to the operators file and added the test_case as well. Should I do a PR/Merge request? I can also provide you the forked repo in case you want to check before merging.
Hi, @Hanrui-Wang Apart from some Quantum Gates that I have added in my PR #138 , should I also add some ansatz layers/N-local circuits like RealAmplitudes, EfficientSU2, Two-Local, etc. that are used quite often in Qiskit Machine Learning
Hi, @Hanrui-Wang Apart from some Quantum Gates that I have added in my PR #138 , should I also add some ansatz layers/N-local circuits like RealAmplitudes, EfficientSU2, Two-Local, etc. that are used quite often in Qiskit Machine Learning
Hi bopardikarsoham,
Yes, ansatz layers/N-local layers are also very important so they are highly encouraged! When you implement RealAmplitudes, EfficientSU2, Two-Local, it would be better to also have similar hierarchy of classes as qiskit.
I add a PR for QFT in #142
Made changes and Added basic gates for issue #134
Congrats @pandey-tushar, @bopardikarsoham and @dhanvi-bharadwaj for successfully merged the pull requests and thank you for your contributions! Since UnitaryHack comes to an end, I will close this issue but we will very appreciate if you can continue to contribute to new functionalities in torchquantum!
In order to enrich the supported operations of tq, we need your help on adding more functionalities.
Please firstly identity the gates that have not been supported by torchquantum, you can find them by having a look at other frameworks such as Qiskit, Cirq etc. You can identity the gates that not supported by looking at qiskit.circuit.library. Such as the SdG gate: SdgGate
For the simplest non-parameterized gates, you need firstly add their unitary matrix to tq.functional file: https://github.com/mit-han-lab/torchquantum/blob/8d06a998a6d35374907c5e75a347d187e837b8cc/torchquantum/functional.py#L1104 and also add their functions. Then you can add a class to the tq.operators files and finally add test function to test/test_op.py. You may create new test files.
You may also implement other template layers according to qiskit.circuit.library. https://qiskit.org/documentation/apidoc/circuit_library.html
Please let us know if you have any questions or need any instructions!