diff --git a/tools/Error and Power Calc/Benchmarks.md b/tools/Error and Power Calc/Benchmarks.md index 547aaf3..b563ae8 100644 --- a/tools/Error and Power Calc/Benchmarks.md +++ b/tools/Error and Power Calc/Benchmarks.md @@ -10,6 +10,8 @@ Quantum computing has the threefold difficulty of having low level assembly arch As an open source project, these quantum computers are not expected to be in the hands of Quantum physicist or developers, but rather experimenters and hobbyists. This makes documentation more critical than other quantum projects. This documentation will assist in fulfilling the Roadmap's Documentation success criteria. +The power of the quantum computer will be some combination of these, dependant on your application. + ## Qbit Count ### 8 Qbits @@ -17,9 +19,11 @@ Just counting Qbits is the first, quickest and easiest way to attempt to quantif ## CLOPS ## See question #25 on GitHub +## ~60,000 CLOPS -CLOPS stands for Circuit Level Operations per Second. In other words, how many gates can be executed a second. Yes, this is hertz. This is probably to distinguish between the computer's speed and the frequencies needed to communicate with the qbit. -The maximum CLOPS will be determined by the slowest part in our gate and controller setup. The question has been raised on GitHub, question #25. +CLOPS stands for Circuit Level Operations per Second. In other words, how many gates can be executed a second. Yes, this is hertz. This is probably to distinguish between the computer's speed and the frequencies needed to communicate with some types of qbit. +The maximum CLOPS will be determined by the slowest part in our gate and controller setup. + ~60,000 CLOPS is attainable. As always, your particular build may be diffrent. ## Quantum Volume ## Depends on build. Benchmarking software in progress. @@ -30,3 +34,6 @@ First we take n Qbits, and implement the Heavy output Generation algorithm for i Last we find QV=2^(lastNToPass). A quick use of a calculator reveals that the theoretical maximum for our 8-qbit quantum computer is 2^8=256. This is quite a bit larger than IBM's most powerful computer with a quantum volume of 128. With a lack of data, a QV of zero is probably to be expected. Noise canceling, incresing CLOPS, and other hardware improvements should improve this. It's going to be a lot of work, but the existence of an affordable quantum computer is a great improvement! + +## Quantum Fidelity? +Figure this out \ No newline at end of file diff --git a/tools/Error and Power Calc/Benchmarks.py b/tools/Error and Power Calc/Benchmarks.py new file mode 100644 index 0000000..8b44838 --- /dev/null +++ b/tools/Error and Power Calc/Benchmarks.py @@ -0,0 +1,59 @@ +#For further explanation see Benchmarks.md + + +import Error_Cals.qasam as qasam +import time + +def qbit_count(): + #hardcoding this in, would like to have this like a -h option. + return 8 + +def clops(): + #We want to count how many operations we can do per second. Thus we time how long it takes to do a basic gate, then do math to figure out how many can be done per second. + Start=time.clock() + #since all the gates are the same, any cnot should take the same time. + #TODO Should I do a lot of these and avg the times? + qasam.CNOT(0,1) + End=time.clock() + T=End-Start + F=1/T + return F + +def QV(): + # This is going to be rough, The individual steps are going to take some work and there are 6. + # adapted from https://qiskit.org/textbook/ch-quantum-hardware/measuring-quantum-volume.html + # Need to do research for the details. yay + + QVseq=generateQVSeq() + IdealOut=simIdealOut() + HeavOut=calcHeavOut() + Noise=defineNoise() + GateFid=avgGateFidelity() + MaxDepth=calcMaxDepth() + return calcQuantVol() + + + +def generateQVSeq(): + + # qubit_lists: list of list of qubit subsets to generate QV circuits + qubit_lists = [[0,1,2],[0,1,2,3],[0,1,2,3,4],[0,1,2,3,4,5],[0,1,2,3,4,5,6],[0,1,2,3,4,5,6,7]] + # ntrials: Number of random circuits to create for each subset + ntrials = 100 + + #and here the function dies because I don't know what the qv_circuit is + return NotImplementedError + + +def simIdealOut(): + return NotImplementedError +def calcHeavOut(): + return NotImplementedError +def defineNoise(): + return NotImplementedError +def avgGateFidelity(): + return NotImplementedError +def calcMaxDepth(): + return NotImplementedError +def calcQuantVol(): + return NotImplementedError \ No newline at end of file diff --git a/tools/Error and Power Calc/Error_Calcs.py b/tools/Error and Power Calc/Error_Calcs.py new file mode 100644 index 0000000..038b91d --- /dev/null +++ b/tools/Error and Power Calc/Error_Calcs.py @@ -0,0 +1,74 @@ +#For further explanation see Error_Theory.md + +import Error_Cals.qasam as qasam +import time + + +def qc_err(): + #Need to figure out delay in qsam + return NotImplementedError + +def gate_err(q,runs): + #Gate error= total error - Qbit error for the gate. + #Run the functions required to get the errors needed. + tot=total_err(q,runs) + QErr=Qbit_err() + + #Setup the required variables + gateErr=[] + i=0 + j=0 + + #Start the math. I think there is a easier way in python, but I'm mostly a C++ dev and so I'm used to just buildng the thing and python makes that easy anyway. + while i c; \ No newline at end of file diff --git a/tools/Error and Power Calc/Error_Theory.md b/tools/Error and Power Calc/Error_Theory.md index d3f3444..27001df 100644 --- a/tools/Error and Power Calc/Error_Theory.md +++ b/tools/Error and Power Calc/Error_Theory.md @@ -50,7 +50,7 @@ Decoerance is a function that I expect to be of the form where t is time: It is possible to get further orders, but I do not expect more. A is going to be a combination of some constant error for each Qbit, as well as QC error. Thus A = QC+a. Due to the lack of single photon source, we will assume that a is small. We measure this by preparing all the Qbits, holding them for a time, then measuring. We must take into account the time taken between measurements. -i.e, if we say it takes nu milliseconds to measure a Qbits and we measure them in order, the time for Qbit n (Tn) is Tn=t+(nu*n) +i.e, if we say it takes nu milliseconds to measure a Qbit and we measure them in order, the time for Qbit n (Tn) is Tn=t+(nu*n) We will then determine the function for each individual Qbit and fit a curve, as well as apply other statistics as needed. Lastly we will do the same for all Qbits.