tempoCollaboration / OQuPy

A Python package to efficiently simulate non-Markovian open quantum systems with process tensors.
https://oqupy.readthedocs.io
Apache License 2.0
78 stars 27 forks source link

A question on setting the initial state #63

Open adscft-quibt opened 2 years ago

adscft-quibt commented 2 years ago

Hi TEMPO developers,

I have a question about the setting of the initial state. How can i set the initial state of the system as the maximal entanglement state in PT-TEBD algorithm,if the system is composed by two qubits?

Best regards.

gefux commented 2 years ago

Hi @adscft-qubit!

You can start a TEBD simulation in any state. For this it is, however, necessary to enter the state in a canonical Vidal form in Liouville space. This means that for a N site chain you'll need to enter the state in an MPS form consisting of N Gamma tensors and N-1 diagonal lambda matrices as shown in this picture:

2022-03-24_18:10:46_area

I've labeled the axis of the Gamma tensors with "L" for "left bond", "R" for "right bond", "P" for "physical bond in vectorised Liouville space". The axis order should be [L, P, R] as described in the documentation of oqupy.AugmentedMPS here.

Example: |Ψ-> Bell State

Let's assume we'd like to start a PT-TEBD simulation in the Bell State |Ψ-> = |u, d> - |d, u>. (read "up" and "down" for "u" and "d"). The density matrix for this state is:

2022-03-24_18:10:56_area

The last expression is an MPS in canonical form with a bond dimension of 4 due to the 4 terms. We can write this in python using the single site Liouville basis {uu, ud, du, uu} where xy = |x><y|.

uu = np.array([[1,0],[0,0]]).flatten()
ud = np.array([[0,1],[0,0]]).flatten()
du = np.array([[0,0],[1,0]]).flatten()
dd = np.array([[0,0],[0,1]]).flatten()

gamma0 = np.array([uu,(-1)*ud, (-1)*du, dd])
lambda0 = np.array([0.5, 0.5, 0.5, 0.5])
gamma1 = np.array([dd, du, ud, uu])

gamma0.shape=(1,4,4)
gamma0 = np.swapaxes(gamma0, 1, 2)
gamma1.shape=(4,4,1)

initial_augmented_mps = oqupy.AugmentedMPS(
    gammas=[gamma0, gamma1],
    lambdas=[lambda0,])

@adscft-qubit: Is this what you needed?

Comments:

  1. There has been a bug #64 concerning correlated initial MPS in the release, which I've corrected with the last commit 1f42e2f.
  2. We appreciate that this is not the most convenient way of entering a general initial state. Making correlated initial state more accessible is on an internal ToDo list. If anyone has any problems with this (or, in fact, has written something that could help) feel free to open another issue about it!

Best, gefux