Skip to content

Conversation

@svan5003
Copy link

@svan5003 svan5003 commented Oct 20, 2025

Context:
'cutoff' argument for the 'density_matrix(mu, cov, post_select, normalize, cutoff, hbar)' function from 'fock_tensors.py' is the same for all modes

Description of the Change:
Added support of the 'list' type of 'cutoff' argument for the 'density_matrix(mu, cov, post_select, normalize, cutoff, hbar)' function from 'fock_tensors.py'. It enables to perform larger simulations.
Example: 4 bosonic modes
Hilbert space dimensions 20 for each mode => ~380 GB of RAM for a density matrix.
Hilbert space dimensions 20 for 2 main and 3 for auxiliary modes => 200 MB of RAM for a density matrix.

Benefits:
Enables users to choose different Hilbert space dimensions for different modes of a density matrix. It can be helpful for simulations with a large number of modes.

Possible Drawbacks:
None

Related GitHub Issues:
None

@svan5003 svan5003 changed the title custom dimensions for multimode density matrix custom dimensions for a multimode density matrix Oct 20, 2025
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe this should go in the 0.23 section

Copy link
Author

Choose a reason for hiding this comment

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

Ok, I will fix CHANGELOG.md

I have a question. Although, I didn't change function hermite_multidimensional in _hermite_multidimensional.py, it compatible with a list cutoff by design. Should I change the documentation of this function?

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.

2 participants