Skip to content

Compilation error with complex hybridization #187

Description

@hmenke

Prerequisites

Description

The combination of -DHybridisation_is_complex=ON -DLocal_hamiltonian_is_complex=OFF does not compile currently, whereas -DHybridisation_is_complex=ON -DLocal_hamiltonian_is_complex=ON does compile without problems. However, I believe that compelx hybridization and complex local Hamiltonian do not imply one another, no? Hence the combination of -DHybridisation_is_complex=ON -DLocal_hamiltonian_is_complex=OFF should also be possible.

Steps to Reproduce

  1. cmake -S . -B build -DHybridisation_is_complex=ON -DLocal_hamiltonian_is_complex=OFF
  2. cmake --build build/

Expected behavior: No compiler error.

Actual behavior: Compilation error.

/tmp/cthyb_unstable/c++/triqs_cthyb/measures/G_tau.cpp:69:30: error: no matching conversion for functional-style cast from 'expr<'-', expr<'-', basic_array_view<complex<double>, 2, C_stride_layout, 'M', default_accessor, borrowed<nda::mem::AddressSpace::Host>>, int>, basic_array_view<complex<double>, 2, C_stride_layout, 'M', default_accessor, borrowed<nda::mem::AddressSpace::Host>>>' to 'matrix_t' (aka 'basic_array<double, 2, nda::C_layout, 'M', nda::heap_basic<nda::mem::mallocator<nda::mem::AddressSpace::Host>>>')
   69 |       G_tau_block[0] = 0.5 * matrix_t(G_tau_block[0] - 1 - G_tau_block[last]);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Versions

  • TRIQS

    commit 29808cc6f8803c1e58f7526563afd61cc2df6598 (HEAD -> unstable, origin/unstable)
    Author: Harrison LaBollita <harrisonlabollita@gmail.com>
    Date:   Thu Aug 14 12:15:43 2025 -0400
    
        add optional axes argument to oplot, deprecate ax.oplot
    
  • cthyb

    commit f4ff9639dac671b609f4c40f2595f1b61627f06f (HEAD -> unstable, origin/unstable)
    Author: Nils Wentzell <nwentzell@flatironinstitute.org>
    Date:   Tue Oct 14 13:46:15 2025 -0400
    
        Sort states in descending order of probability in the multiplet analysis
    

Formatting

Please use markdown in your issue message. A useful summary of commands can be found here.

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions