Exemple #1
0
        public bool isValid()
        {
            double sum = 0.0;

            foreach (Complex c in this.qubitVector)
            {
                double mod = ComplexMath.mod(c);
                sum += mod * mod;
            }
            return(sum == 1.0);
        }