コード例 #1
0
    //Doing the work. Creates a new job and runs it.
    void prepareAndStartJob()
    {
        //Showing Loading Indicator
        LoadingIndicator.SetActive(true);

        //First create a new simulatejob to run this on a seperate thread
        myJob = new SimulateJob();
        //Now set the "simulator" to the QiskitSimulator. (If UseReal is set to true, a real backend is used, and your Token needs to be provided).
        myJob.Simulator = new QiskitSimulator(1000, UseReal, Token);
        //Creating a circuit from the red channel of the provided texture (for black and white image any of the 3 color channels is ok).
        myJob.Circuit = QuantumImageCreator.GetCircuitDirect(Input, ColorChannel.R);
        //applying additional manipulation to the circuit
        applyPartialQ(myJob.Circuit, Rotation);
        //run the job, meaning start the simulation (or the call to the backend)
        myJob.Start();
    }
コード例 #2
0
    //Doing the work. Creates a new job and runs it.
    void prepareAndStartJob()
    {
        if (DeviceName.Length < 5)
        {
            DeviceName = "ibmq_16_melbourne";
        }

        //Showing Loading Indicator
        LoadingIndicator.SetActive(true);

        //First create a new simulatejob to run this on a seperate thread
        myJob = new SimulateJob();
        //Now set the "simulator" to the QiskitSimulator. (If UseReal is set to true, a real backend is used, and your Token needs to be provided).
        myJob.Simulator = new QiskitSimulator(NumberOfShots, UseReal, Token, DeviceName, DontStartPython, UseInternalDevice);
        //Creating a circuit from the red channel of the provided texture (for black and white image any of the 3 color channels is ok).
        myJob.Circuit = QuantumImageCreator.GetCircuitDirect(Input, ColorChannel.R);
        //applying additional manipulation to the circuit
        applyPartialQ(myJob.Circuit, QuantumBlurRotation);
        //run the job, meaning start the simulation (or the call to the backend)
        myJob.Start();
    }