Пример #1
0
 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;
 }
Пример #2
0
 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;
 }
Пример #3
0
 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);
 }
Пример #4
0
 public SimpleProtocolEventArgs(TransmissionItem item, ModelingMode modelingMode)
 {
     Item = item;
     ModelingMode = modelingMode;
 }