示例#1
0
        public void ApplyGate(Gate gate)
        {
            this.matrix = gate.Matrix * this.matrix;

            for (var i = 0; i < this.register.Length; i++)
            {
                this.register[i] = null;
            }
        }
示例#2
0
 public Gate Combine(Gate other)
 {
     return(new Gate(ComplexMatrix.TensorProduct(this.Matrix, other.Matrix)));
 }
示例#3
0
 public Gate Compose(Gate other)
 {
     return(new Gate(other.Matrix * this.Matrix));
 }
示例#4
0
 public Gate Compose(Gate other)
 {
     return new Gate(other.Matrix * this.Matrix);
 }
示例#5
0
 public Gate Combine(Gate other)
 {
     return new Gate(ComplexMatrix.TensorProduct(this.Matrix, other.Matrix));
 }