public TransmissionItem Process(ModelingMode modelingMode) { _transmissionItem = new TransmissionItem(Params.Phase0, Params.Phase1); var e = new SimpleProtocolEventArgs(_transmissionItem, modelingMode); AllInOneDevice.ProcessForward(e); Started(this, e); return _transmissionItem; }
public static MeasurementResult EvaMeasure(TransmissionItem transmissionItem) { var c = Math.Cos(transmissionItem.Phase0 - transmissionItem.Phase1); var conclusive = RandomHelper.RandomBool(c); if (conclusive) { return Math.Abs(transmissionItem.BobPhase - transmissionItem.Phase0) < 1e-6 ? MeasurementResult.Phase0 : MeasurementResult.Phase1; } return MeasurementResult.Inconclusive; }
public static void Laser(TransmissionItem transmissionItem) { transmissionItem.QuantumState = new QuantumState(); var phase = RandomHelper.RandomNumber(0, 6, 3); transmissionItem.QuantumState.Timeslot[0] = 156*Complex.Exp(phase*Complex.ImaginaryOne); }
public SimpleProtocolEventArgs(TransmissionItem item, ModelingMode modelingMode) { Item = item; ModelingMode = modelingMode; }