private static QVoid ExecuteConditionalStatementInternal(QuantumProcessorDispatcher Simulator, long statement, ICallable onEqualOp, ICallable onNonEqualOp, OperationFunctor type, IQArray <Qubit>?ctrls) { bool run; run = Simulator.QuantumProcessor.RunThenClause(statement); while (run) { RunClause(onEqualOp, type, ctrls); run = Simulator.QuantumProcessor.RepeatThenClause(statement); } run = Simulator.QuantumProcessor.RunElseClause(statement); while (run) { RunClause(onNonEqualOp, type, ctrls); run = Simulator.QuantumProcessor.RepeatElseClause(statement); } Simulator.QuantumProcessor.EndConditionalStatement(statement); return(QVoid.Instance); }
private static QVoid ExecuteConditionalStatement(QuantumProcessorDispatcher Simulator, Result measurementResult, Result resultValue, ICallable onEqualOp, ICallable onNonEqualOp, OperationFunctor type, IQArray <Qubit>?ctrls) { long statement = Simulator.QuantumProcessor.StartConditionalStatement(measurementResult, resultValue); return(ExecuteConditionalStatementInternal(Simulator, statement, onEqualOp, onNonEqualOp, type, ctrls)); }
public QuantumProcessorDispatcherM(QuantumProcessorDispatcher m) : base(m) { this.Simulator = m; }
public QuantumProcessorDispatcherAllocate(QuantumProcessorDispatcher m) : base(m) { sim = m; }
public QuantumProcessorDispatcherDumpRegister(QuantumProcessorDispatcher m) : base(m) { this.Simulator = m; }
public QuantumProcessorDispatcherDumpMachine(QuantumProcessorDispatcher m) : base(m) { this.Simulator = m; }
public QuantumProcessorDispatcherRandom(QuantumProcessorDispatcher m) : base(m) { Simulator = m; }
public QuantumProcessorDispatcherReturn(QuantumProcessorDispatcher m) : base(m) { sim = m; }
public QuantumProcessorDispatcherBorrow(QuantumProcessorDispatcher m) : base(m) { sim = m; }