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

Heterodyne_detection #222

Open
rubbersou1 opened this issue Oct 8, 2024 · 3 comments
Open

Heterodyne_detection #222

rubbersou1 opened this issue Oct 8, 2024 · 3 comments

Comments

@rubbersou1
Copy link

Hello, I am learning quantum stochastic processes. When I try to run codes given in this example https://qojulia.github.io/QuantumCumulants.jl/stable/examples/heterodyne_detection/#, the program reported an error:
image
when running this part:
code

I tried to fix this program but couldn't. Here is my julia and packages' versions:
image
image

Thanks in advance!

@david-pl
Copy link
Member

david-pl commented Oct 8, 2024

Huh, that example isn't included in the build of the docs since it's a bit experimental. Not sure what version stuck on the docs page is now showing. Fyi, @ChristophHotter

Regarding your issue: you should be able to fix it by doing

@named sys = SDESystem(eqs_scaled)
sys = complete(sys)

The rest should work the same.

@rubbersou1
Copy link
Author

I have tried this code, it reported a new error:
image

@david-pl
Copy link
Member

I had another look and I think the problem comes from this time variable that's defined in the beginning of the example.

@syms t::Real

It's used in the definition of the Hamiltonian, but it's then not passed in explicitly when the equations are derived. That used to work since, by coincidence, it was the exact same definition as the time variable used internally as default when no independent variable was passed into the meanfield function.

The time variable should actually be defined with

@independent_variables t::Real

and then passed into the meanfield function as

eqs = meanfield(ops,H,J; rates = rates, efficiencies = efficiencies, order = 2, iv = t)

Using this, you can get the code to run.

However, please note that the solution here is unstable, i.e. the photon number diverged when I ran the example locally. Not sure how to fix that, there's a reason why this example is not really part of the documentation. @ChristophHotter @Nico0oblr any ideas here?

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

No branches or pull requests

2 participants