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
{{ message }}
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
In source file matrixproductstates/base_mps.py
function apply_two_site_gate
line 583-592:
if center_position == site2:
R, Q = self.backend.rq(tensor, pivot_axis=2)
left_tensor = R
right_tensor = Q
set_center_position(site2)
else:
Q, R = self.backend.qr(tensor, pivot_axis=2)
left_tensor = Q
right_tensor = R
set_center_position(site1)
This code block corresponds to the case that no truncation is performed when applying a two site gate.
Since site1 is left to site2, and that all nodes except the center one should be unitary after the operations, one should use rq if center_position == site1 and qr if center_position == site2.
So the right one should be
if center_position == site1:
R, Q = self.backend.rq(tensor, pivot_axis=2)
left_tensor = R
right_tensor = Q
set_center_position(site1)
else:
Q, R = self.backend.qr(tensor, pivot_axis=2)
left_tensor = Q
right_tensor = R
set_center_position(site2)
In source file matrixproductstates/base_mps.py
function
apply_two_site_gate
line 583-592:
This code block corresponds to the case that no truncation is performed when applying a two site gate.
Since
site1
is left tosite2
, and that all nodes except the center one should be unitary after the operations, one should userq
ifcenter_position == site1
andqr
ifcenter_position == site2
.So the right one should be
A simple example to illustrate this issue is:
where I got
The text was updated successfully, but these errors were encountered: