public FunctionPartial(Function <I, O> op, object partialTuple) : base(op.Factory)
        {
            Debug.Assert(op != null);
            Debug.Assert(partialTuple != null);

            this.BaseOp = op;
            this.Mapper = PartialMapper.Create <P, I>(partialTuple);
        }
Exemple #2
0
        public OperationPartial(Operation <I, O> op, object partialTuple) : base(op.Factory)
        {
            Debug.Assert(op != null);
            Debug.Assert(partialTuple != null);

            this.BaseOp   = op;
            this.Mapper   = PartialMapper.Create <P, I>(partialTuple);
            this.__qubits = new Lazy <Qubit[]>(() => op?.__dataIn(this.Mapper(default(P)))?.Qubits?.ToArray());
        }