Example #1
0
        public void MultiplyBy(BinaryOperation gate, int key1, int key2)
        {
            var bitLen  = AlgebraUtility.Log2(v.Length);
            var bit1Pos = posMap[key1];
            var bit2Pos = posMap[key2];

            v = AlgebraUtility.Multiply(
                gate.GetMatrix(bitLen, bit1Pos, bit2Pos), v
                );
        }