You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preparing a pure state in a subsystem should not convert the entire state representation into a density matrix unless it is necessary. If the reduced state of the rest of the system is pure at the time of the preparation, the entire state remains pure.
Expected behavior: State representation remains a ket vector after Fock(1) is executed
Actual behavior: State representation changes into a density matrix
Also applies to other preparations.
Minimal example
import strawberryfields as sf
from strawberryfields.ops import *
if __name__ == '__main__':
backend = 'fock'
eng, q = sf.Engine(2)
st = eng.run(backend, cutoff_dim=5)
print(st)
with eng:
Fock(1) | 0
st = eng.run(backend, cutoff_dim=5)
print(st)
The text was updated successfully, but these errors were encountered:
We are aware of this and plan to implement it in a future release. While it seems like a simple issue, it requires some caution with the implementation since we will have to track whether the mode(s) where the state is prepared are potentially entangled with other modes.
Preparing a pure state in a subsystem should not convert the entire state representation into a density matrix unless it is necessary. If the reduced state of the rest of the system is pure at the time of the preparation, the entire state remains pure.
Possibly related to #20
Issue description
Expected behavior: State representation remains a ket vector after Fock(1) is executed
Actual behavior: State representation changes into a density matrix
Also applies to other preparations.
Minimal example
The text was updated successfully, but these errors were encountered: