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

AUTOSHAPE for fock states #490

Open
1 task done
JacobHast opened this issue Sep 13, 2024 · 0 comments
Open
1 task done

AUTOSHAPE for fock states #490

JacobHast opened this issue Sep 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JacobHast
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

I expect the application of Gaussian operations on state in the Fock representation to apply suitable cutoffs based on the AUTOSHAPE settings

Actual behavior

If I apply any Gaussian operation on a Fock state, the cutoff is expanded to the value given by AUTOSHAPE_MAX, regardless of the value of AUTOSHAPE_PROBABILITY

Reproduces how often

100 %

System information

Mr Mustard: a differentiable bridge between phase space and Fock space.
Copyright 2021 Xanadu Quantum Technologies Inc.

Python version:            3.10.14
Platform info:             Windows-10-10.0.19045-SP0
Installation path:         
c:\Users\jacob\miniconda3\envs\mrmustard_dev\lib\site-packages\mrmustard
Mr Mustard version:        0.7.3
Numpy version:             1.23.5
Numba version:             0.59.1
Scipy version:             1.14.1
The Walrus version:        0.21.0
TensorFlow version:        2.17.0

Source code

from mrmustard import settings
import mrmustard.lab_dev as mm

settings.AUTOSHAPE_PROBABILITY = 0.9
settings.AUTOSHAPE_MAX = 10

state = mm.Ket.from_fock([0], [0, 1])

state >> mm.Dgate([0])

Tracebacks

No response

Additional information

No response

@JacobHast JacobHast added the bug Something isn't working label Sep 13, 2024
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

1 participant