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

Modes are not concatenated correctly between fock and gaussian states #237

Open
1 task done
sduquemesa opened this issue Apr 14, 2023 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@sduquemesa
Copy link
Contributor

Before posting a bug report

  • I have searched exisisting GitHub issues to make sure the issue does not already exist.

Expected behavior

When concatenating a Fock and a Gaussian state its modes should be consecutive, meaning the following code

from mrmustard.lab import TMSV, Fock, SqueezedVacuum
state_fock = TMSV(r=-0.5,phi=0,modes=[0,1]) & Fock([1,2,3],modes=[2,3,4])
state_fock.modes

should produce the output [0, 1, 2, 3, 4]. Similarly, concatenating two gaussian state

state_guassian = TMSV(r=-0.5,phi=0,modes=[0,1]) & SqueezedVacuum(r=[1.0]*3,phi=[0.0]*3,modes=[2,3,4])
state_guassian.modes

should produce [0, 1, 2, 3, 4] as well.

Actual behavior

in the first case modes come out to be [0, 1, 4, 5, 6] whereas in the second they are [0, 1, 2, 3, 4] as expected.

Reproduces how often

always

System information

not relevant

Source code

from mrmustard.lab import TMSV, Fock, SqueezedVacuum
state_fock = TMSV(r=-0.5,phi=0,modes=[0,1]) & Fock([1,2,3],modes=[2,3,4])
state_fock.modes

Tracebacks

No response

Additional information

No response

@sduquemesa sduquemesa added the bug Something isn't working label Apr 14, 2023
Copy link
Collaborator

ziofil commented Apr 14, 2023

Oh 🤔 well spotted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants