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

Adding a bunch of gates from the lab #520

Merged
merged 54 commits into from
Dec 9, 2024
Merged

Conversation

arsalan-motamedi
Copy link
Collaborator

@arsalan-motamedi arsalan-motamedi commented Nov 6, 2024

Context:
There are many interesting things implemented in the old lab which are still missing in lab_dev.

Description of the Change:
We add the following gates:

  • Pgate: the quadratic phase gate
  • CXgate and CZgate: the controlled-X and -Z gates
  • MZgate: Mach-Zehnder gate
  • Interferometer and RealInterferometer

Also, we add the BargmannEigenstate which are simply unnormalized coherent states.

Benefits:
More things to have ready!

Possible Drawbacks:
None.

Related GitHub Issues:
None.

@arsalan-motamedi arsalan-motamedi added the no changelog Pull request does not require a CHANGELOG entry label Nov 6, 2024
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.16%. Comparing base (4c603d0) to head (babcd2e).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #520      +/-   ##
===========================================
+ Coverage    89.84%   90.16%   +0.31%     
===========================================
  Files           93      101       +8     
  Lines         6098     6291     +193     
===========================================
+ Hits          5479     5672     +193     
  Misses         619      619              
Files with missing lines Coverage Δ
mrmustard/lab_dev/states/__init__.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/states/bargmann_eigenstate.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/states/gstate.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/states/ket.py 98.59% <ø> (ø)
mrmustard/lab_dev/transformations/__init__.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/transformations/cxgate.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/transformations/czgate.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/transformations/ggate.py 100.00% <100.00%> (ø)
...rmustard/lab_dev/transformations/interferometer.py 100.00% <100.00%> (ø)
mrmustard/lab_dev/transformations/mzgate.py 100.00% <100.00%> (ø)
... and 9 more

Continue to review full report in Codecov by Sentry.

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

Copy link
Collaborator

@apchytr apchytr left a comment

Choose a reason for hiding this comment

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

Some initial comments. Thanks Arsalan!

mrmustard/lab_dev/states/bargmanneigenstate.py Outdated Show resolved Hide resolved
mrmustard/lab_dev/states/bargmanneigenstate.py Outdated Show resolved Hide resolved
mrmustard/lab_dev/states/bargmanneigenstate.py Outdated Show resolved Hide resolved
mrmustard/lab_dev/transformations/cxgate.py Outdated Show resolved Hide resolved
mrmustard/lab_dev/transformations/cxgate.py Show resolved Hide resolved
mrmustard/lab_dev/transformations/czgate.py Outdated Show resolved Hide resolved
mrmustard/lab_dev/transformations/pgate.py Outdated Show resolved Hide resolved
@Rahps97
Copy link

Rahps97 commented Nov 20, 2024

Hi,
Sorry for a newbie question. I was looking for a Kerr gate (need to implement non-linear operation). Any suggestions?

arsalan-motamedi and others added 2 commits December 5, 2024 14:42
Co-authored-by: Anthony <125415978+apchytr@users.noreply.github.com>
@arsalan-motamedi
Copy link
Collaborator Author

Hi, Sorry for a newbie question. I was looking for a Kerr gate (need to implement non-linear operation). Any suggestions?

Thank you for the question. We are working to add a Unitary.from_fock() method which can be used to initialize a Kerr gate.

@arsalan-motamedi arsalan-motamedi merged commit 2a1d7f9 into develop Dec 9, 2024
8 checks passed
@arsalan-motamedi arsalan-motamedi deleted the many-unitaries branch December 9, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no changelog Pull request does not require a CHANGELOG entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants