public void ApplyGate(Gate gate) { this.matrix = gate.Matrix * this.matrix; for (var i = 0; i < this.register.Length; i++) { this.register[i] = null; } }
public Gate Combine(Gate other) { return(new Gate(ComplexMatrix.TensorProduct(this.Matrix, other.Matrix))); }
public Gate Compose(Gate other) { return(new Gate(other.Matrix * this.Matrix)); }
public Gate Compose(Gate other) { return new Gate(other.Matrix * this.Matrix); }
public Gate Combine(Gate other) { return new Gate(ComplexMatrix.TensorProduct(this.Matrix, other.Matrix)); }