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

Add T, S gates #525

Merged
merged 10 commits into from
Dec 22, 2021
Merged

Add T, S gates #525

merged 10 commits into from
Dec 22, 2021

Conversation

mlazzarin
Copy link
Contributor

Closes #524. I added S and T, along with their conjugate transpose SDG and TDG. Still need to update the tests.

@mlazzarin mlazzarin added the enhancement New feature or request label Dec 20, 2021
@mlazzarin mlazzarin self-assigned this Dec 20, 2021
@codecov
Copy link

codecov bot commented Dec 20, 2021

Codecov Report

Merging #525 (1394fd9) into master (d2c7e1a) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##            master      #525    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           85        85            
  Lines        12284     12439   +155     
==========================================
+ Hits         12284     12439   +155     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/qibo/tests/test_backends_matrices.py 100.00% <ø> (ø)
src/qibo/tests/test_cirq.py 100.00% <ø> (ø)
src/qibo/abstractions/gates.py 100.00% <100.00%> (ø)
src/qibo/backends/matrices.py 100.00% <100.00%> (ø)
src/qibo/core/gates.py 100.00% <100.00%> (ø)
src/qibo/tests/test_abstract_circuit_qasm.py 100.00% <100.00%> (ø)
src/qibo/tests/test_abstract_gates.py 100.00% <100.00%> (ø)
src/qibo/tests/test_core_circuit_qasm.py 100.00% <100.00%> (ø)
src/qibo/tests/test_core_gates.py 100.00% <100.00%> (ø)
src/qibo/tests/test_core_gates_density_matrix.py 100.00% <100.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2c7e1a...1394fd9. Read the comment docs.

@mlazzarin mlazzarin changed the title [WIP] Add T, S gates Add T, S gates Dec 20, 2021
@mlazzarin mlazzarin marked this pull request as ready for review December 20, 2021 13:06
@mlazzarin
Copy link
Contributor Author

Ok, I added the tests, now it's ready for review.

Copy link
Member

@stavros11 stavros11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for implementing this. There is a test file called test_core_circuit_qasm.py where we create circuits from qasm in qibo and cirq and we verify that their execution agrees. Since qasm was the original motivation of this PR, I would suggest to add a test involving these gates there. Other than that, everything looks good.

src/qibo/tests/test_core_gates.py Outdated Show resolved Hide resolved
@mlazzarin
Copy link
Contributor Author

I implemented your suggestions. Let me know if you agree with the changes.

Copy link
Member

@stavros11 stavros11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates, looks good to me.

Copy link
Contributor

@andrea-pasquale andrea-pasquale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this implementation.
LGTM.

@scarrazza scarrazza merged commit 20fb08d into master Dec 22, 2021
@AdrianPerezSalinas
Copy link
Contributor

AdrianPerezSalinas commented Jan 20, 2022

Hi all, I know that you made great work and these gates are functional. However, the .draw() method does not recognize them. I am using the current '0.1.7rc2.dev0' version.

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

Successfully merging this pull request may close these issues.

QASM command not recognized
5 participants