Package com.polytechnik.utils
Class IstatesConditionalV2
java.lang.Object
com.polytechnik.utils.IstatesConditionalV2
Find \( \left|\psi\right> \) state such that
\[
\frac{\left<\psi|I| \psi\right>}{\left<\psi|\psi\right> }
\xrightarrow[\psi]{\quad }\max
\]
subject to:
\[
\left<\psi|C|\psi\right>=0
\] .
Similar to
IstatesConditional
but has an updated
algorithm (minor improvements). A different approach
in IstatesConditionalSubspaceLinearConstraints
seems to provide
better results.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
Given an input bQQconditional=bQQi+mu*bQQc matrix find it's eigenvectors and modify then to satisfy the constraint <psi|bQQc|psi>=0 to obtain new |psi> candidates in several variants as perFindPsiConstrainedSingleQuadratic0
.private static class
Given an inputFindPsiConstrainedSingleQuadratic0
class it takes all it's adjustedFindPsiConstrainedSingleQuadratic0.psiConstrained
states and select the one with maximal <psi|I|psi> among all the provided |psi> with the constraint <psi|bQQc|psi>=0 satisfied. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal boolean
Whether a solution exists.final EVXData
The |I|psi>=lambda |psi> solution.final double
The <psi_M|I|psi_M>.final double
Lagrange multiplier value.final double
Last value of eigenstate, in case of algorithm convergence matches toi_M
.private static final int
final double[]
The state of maxI conditional to <psi|QQc|psi>=0.final double
The <psi_M|psi0>^2, a kind of "distance" to "now". -
Constructor Summary
ConstructorsConstructorDescriptionIstatesConditionalV2
(int n, double[] QQt, double[] QQi, double[] QQc, OrthogonalPolynomialsBasisFunctionsCalculatable<? extends BasisFunctionsCalculatable> M, double eps) -
Method Summary
Modifier and TypeMethodDescription(package private) double[]
getbQQcFromQQc
(double[] QQc) (package private) static List
<double[]> getInitialTriesCommonVersion
(int n) private static double
getLagrangeMultiplier
(PsiConstrained bpsi_M, double[] bQQi, double[] bQQc) Calculate Lagrange multiplier.private static List
<IstatesConditionalV2.GetMaxIState> getSeqOfInitFunctions
(int n, List<double[]> bpsiInit, double[] bQQi, double[] bQQc, double[] ev_bQQc, double eps) Given a sequence of inputbpsiInit
modify each of them to satisfy the constraint then applyIstatesConditionalV2.GetMaxIState
to find the state with maximal <psi|bQQi|psi>.static void
Unit test.(package private) static void
(package private) static <T> List
<T> selectSomeNotVerySimilarInitFunctions
(int n, int nInitApprox, List<T> inSorted, Function<T, double[]> getPsi) Select given number of initial states removing too similar.
-
Field Details
-
N_iterations
private static final int N_iterations- See Also:
-
i_M
public final double i_MThe <psi_M|I|psi_M>. -
lambda_i_M
public final double lambda_i_MLast value of eigenstate, in case of algorithm convergence matches toi_M
. -
LagrangeMultiplier_M
public final double LagrangeMultiplier_MLagrange multiplier value. -
wr0_M
public final double wr0_MThe <psi_M|psi0>^2, a kind of "distance" to "now". -
psi_M
public final double[] psi_MThe state of maxI conditional to <psi|QQc|psi>=0. -
flag_solution_exists
public final boolean flag_solution_existsWhether a solution exists. -
I
The |I|psi>=lambda |psi> solution.
-
-
Constructor Details
-
IstatesConditionalV2
public IstatesConditionalV2(int n, double[] QQt, double[] QQi, double[] QQc, OrthogonalPolynomialsBasisFunctionsCalculatable<? extends BasisFunctionsCalculatable> M, double eps)
-
-
Method Details
-
getbQQcFromQQc
double[] getbQQcFromQQc(double[] QQc) -
getInitialTriesCommonVersion
-
getSeqOfInitFunctions
private static List<IstatesConditionalV2.GetMaxIState> getSeqOfInitFunctions(int n, List<double[]> bpsiInit, double[] bQQi, double[] bQQc, double[] ev_bQQc, double eps) Given a sequence of inputbpsiInit
modify each of them to satisfy the constraint then applyIstatesConditionalV2.GetMaxIState
to find the state with maximal <psi|bQQi|psi>. -
selectSomeNotVerySimilarInitFunctions
-
getLagrangeMultiplier
Calculate Lagrange multiplier. -
printDiag
-
main
Unit test.
-