예제 #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
파일: Devices.cs 프로젝트: rombolshak/Requc
 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
파일: Devices.cs 프로젝트: rombolshak/Requc
 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;
 }