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

Functions for generating quantum operators #169

Merged
merged 13 commits into from
Jun 23, 2024

Conversation

ytdHuang
Copy link
Member

@ytdHuang ytdHuang commented Jun 16, 2024

close #147

Summarize of this PR:

  • introduce displace (and call it within coherent)
  • introduce num
  • introduce position
    • the function is not exported because it causes conflict with Base.position
  • introduce momentum
    • the function is not exported because I think usually position and momentum are pairs.
  • introduce phase
  • introduce squeeze
  • introduce tunneling
  • introduce qft

@ytdHuang ytdHuang marked this pull request as ready for review June 16, 2024 16:18
Copy link

codecov bot commented Jun 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.31%. Comparing base (c5da8e2) to head (e552fad).

Current head e552fad differs from pull request most recent head 371e3cb

Please upload reports for the commit 371e3cb to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
+ Coverage   93.22%   93.31%   +0.09%     
==========================================
  Files          28       28              
  Lines        2051     2080      +29     
==========================================
+ Hits         1912     1941      +29     
  Misses        139      139              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ytdHuang ytdHuang marked this pull request as draft June 17, 2024 06:23
@ytdHuang ytdHuang removed the request for review from albertomercurio June 17, 2024 06:23
@ytdHuang ytdHuang marked this pull request as ready for review June 17, 2024 07:42
@albertomercurio
Copy link
Member

albertomercurio commented Jun 17, 2024

Mmmm… Yes, It seems the only option for position. Another option would be to not exporting it. I don’t know which one is better.

@ytdHuang
Copy link
Member Author

ytdHuang commented Jun 18, 2024

Mmmm… Yes, It seems the only option for position. Another option would be to not exporting it. I don’t know which one is better.

I also think of the same thing in the beginning. But it would be a bit weird if momentum is exported and position is not.

or maybe we still call them position and momentum, but not exporting them ?

Actually, I seldom use these in QuTiP, I will just generate them with annihilation operator by myself.

As #815485e, I renamed them to position and momentum, also unexport them.

@albertomercurio albertomercurio merged commit ca69f25 into qutip:main Jun 23, 2024
12 checks passed
@ytdHuang ytdHuang deleted the dev/operators branch June 23, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Functions for generating quantum operators
2 participants