Extend `subspace_indices` interface to support implicit method
A limitation in the interface of block_diagonalize
is that it doesn't allow you to use the implicit method when providing subspace_indices
. This means you are always required to construct subspace_eigenvectors
if you want to use the implicit method. We should support a format for subspace_indices
that selects the implicit method.
In the internal chat and in an offline discussion with @isidora.araya and @anton-akhmerov we came up with the following format for subspace_indices
:
- A flat list. The
i
th value in the list correspond to the subspace of thei
element. For example[0, 0, 1, 1, 1]
, which meansAABBB
. This is the current format. This will never use the implicit method. - A nested list. The
i
th list corresponds to thei
th subspace. The values in each list are indices of the Hamiltonian. For example,[[0, 1], [2, 3, 4]]
which meansAABBB
. If the number of provided indices is less then the size of the Hamiltonian, the implicit method will be used. For example[[0, 1],]
, which also meansAABBB
but will treat the B space implicitly.