// NORMALIZE public double NormalizationCoefficient(IComplexMatrix matrix) { double poweredNorm = PoweredNorm(matrix); int count = matrix.countTotalElements(); double temp = 1.0 / poweredNorm; return System.Math.Sqrt(temp); //double coefBase = 1.0 / poweredNorm; //double coefExpo = 1.0 / (double)count; //return System.Math.Pow(coefBase, coefExpo); }
public void setVectorInternal(IComplexMatrix vector) { int count = getNumLevels(); if (count != vector.countTotalElements()) { throw new ExceptionQuantumDebugger(); } for (int i = 0; i < count; i++) { setCoefficientInternal(vector.getElement(i, 0), i); } }