示例#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);
 }
 public SimpleProtocolEventArgs(TransmissionItem item, ModelingMode modelingMode)
 {
     Item = item;
     ModelingMode = modelingMode;
 }