Beispiel #1
0
    public void StartTest()
    {
        if (Circuit.Amplitudes != null && Circuit.Amplitudes.Length > 0)
        {
            Circuit.AmplitudeLength = Circuit.Amplitudes.Length;
        }
        Amplitudes    = simulator.Simulate(Circuit);
        Probabilities = simulator.GetProbabilities(Amplitudes);
        QiskitString  = Circuit.GetQiskitString();

        FloatCircuit = new QuantumCircuitFloat(Circuit);


        MicroQiskitSimulatorFloat floatSimulator = new MicroQiskitSimulatorFloat();

        FloatProbabilities = floatSimulator.GetProbabilities(FloatCircuit);



        ProbabilitieDifference = new double[Probabilities.Length];

        for (int i = 0; i < Probabilities.Length; i++)
        {
            ProbabilitieDifference[i] = Probabilities[i] - FloatProbabilities[i];
        }
    }
Beispiel #2
0
 public void StartTest()
 {
     amplitudes    = simulator.Simulate(Circuit);
     Probabilities = simulator.GetProbabilities(amplitudes);
     QiskitString  = Circuit.GetQiskitString();
 }