Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug in SystemChain with sites of different Hilbert space dimensions #70

Closed
gefux opened this issue Aug 5, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@gefux
Copy link
Member

gefux commented Aug 5, 2022

Something goes wrong when using SystemChain with sites of different Hilbert space dimensions, such as in the following example of two sites with dimensions 2 and 3:

import oqupy
import numpy as np

up_dm = oqupy.operators.spin_dm("z+")
mixed_3_dm = np.identity(3)/3.0

initial_augmented_mps = oqupy.AugmentedMPS([up_dm, mixed_3_dm])
system_chain = oqupy.SystemChain(hilbert_space_dimensions=[2,3])

pt_tebd_params = oqupy.PtTebdParameters(
    dt=0.1,
    order=2,
    epsrel=1.0e-6)

pt_tebd = oqupy.PtTebd(
    initial_augmented_mps=initial_augmented_mps,
    system_chain=system_chain,
    process_tensors=[None, None, None, None, None],
    parameters=pt_tebd_params,
    dynamics_sites=[0, 1],
    chain_control=None)

num_steps = 20
results = pt_tebd.compute(num_steps, progress_type="bar")

... fails with error message:

/data/git/OQuPy/oqupy/system.py in get_nn_full_liouvillians(self)
    666                 factor_l * np.kron(liouv_l, id_r) \
    667                 + factor_r * np.kron(id_l, liouv_r) \
--> 668                 + liouv_nn
    669 
    670             nn_full_liouvillians.append(nn_full_liouvillian)

ValueError: operands could not be broadcast together with shapes (36,36) (16,81) 
@gefux gefux added the bug Something isn't working label Aug 5, 2022
@gefux gefux mentioned this issue Aug 7, 2022
15 tasks
@gefux
Copy link
Member Author

gefux commented Oct 7, 2022

This has been solved with #71

@gefux gefux closed this as completed Oct 7, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant