# Comparison Between FLOPS and CLOPS

I'm now trying to design a quantum circuit via qiskit or pennylane. Here, to show my model's superiority, I'm now finding computational cost metrics (FLOPS in the classical algorithm). In my knowledge, in quantum circuits, CLOPS can be the role of FLOPS in classical computing. Here, if I compare my quantum circuit-based algorithm and classical algorithm, can I convert CLOPS to FLOPS?

• It would improve the question if you could precisely define "CLOPS". Oct 5, 2022 at 15:15

## 3 Answers

In my knowledge, in quantum circuits, CLOPS can be the role of FLOPS in classical computing

can I convert CLOPS to FLOPS?

Well, not really. FLOPS is the number of floating-point operations a classical processor can do per second. CLOPS is the number of Circuit Layer Operation Per Second.

It is indeed possible to draw an analogy between them though. A Floating Point Operation is both a basic operation and the biggest one the classical computer can perform (which means, even if it is part of a bigger circuit, the classical processor has to deal with each FLO one at a time). A Circuit Layer Operation is also both a basic operation and the biggest one the quantum computer can reliably perform.

That said, I think your question is misguided: CLOPS is not circuit-dependent, it is machine-dependent (just like FLOPS is machine-dependent, not circuit-dependant). Thus, you can't prove the superiority of your circuit using these measures. That said, you can intuitively guess which one of your algorithms would be faster by:

• Computing the FLOPS and the CLOPS of your machines;
• Computing the number of CLO and FLO in your algorithms;
• Multiplying out the number of FLO and the FLOPS and the CLO and the CLOPS and compare them.

Intuitively, you will compare the number of basic operations your processor, be it classical or quantum, will perform and the speed at which these operations will be performed.

The general philosophy behind your question is to compare the number of operations per second a quantum processor does to the number of operations per second a classical processor does, in order to see if the quantum processor is better or not than the classical one (correct me if I misunderstood the general sense of your question).

Unfortunately, I think whatever answer you find it wouldn't prove that one is better than the other one.

The quantum speedup does not come from the fact each operation is faster on a quantum computer. Actually operations are likely to be much slower on a quantum processor compared to a classical one. The speedup comes from the fact that the total number of operations to solve a particular task is much lower on a quantum computer compared to a classical one thanks to quantum mechanics. Hence, even if quantum operations are slower, the fact the quantum algorithm requires much less operations than the classical one would provide you a clear speedup (of course one has to put concrete numbers to check "in practice" if there is a speedup under the angle of "will my computer solve the problem faster on this specific problem").

I would also add that comparing the number of operations per second on a quantum vs classical computer is somehow comparing apples and carrots. A rotation in a bloch sphere (single qubit gate) is conceptually completely different than a floating point operation. The only way in which the question would make sense would be if we use quantum hardware to perform purely classical computation (hence we try to make a floating point operation based on quantum hardware). In this case we could compare quantities that have a "dimensional homogeneity". So, to answer "can I convert CLOPS to FLOPS", the answer is likely to be no (apart if the quantum computer is used to perform purely classical computations).

I like your analysis. In a naive sort of way comparing the performance of an algorithm could be looked at as the following. I have a code block/routine. Say it is written in C or C++. I compile the code to assembly ( instruction sets ). Count the number of instructions, figure given the computer architecture ( ARM for example ), Pipe line stages? Each instruction fetch takes x nanoseconds, you get the idea.

For quantum code for my routine, I don't compile in a visible set of instructions. Say I am using IBM's qiskit. The qiskit compiler compiles to some QObj. That is the interface to the quantum computer i am interacting with. I can compare performance in C++ or python here by interesting time() measurements in the code and then print out the time(). I have done that. However, think about this. IBM measures the clops like > 1400 CLOPS for their best qc. Now I have say HHL linear algebra code ( Seth Lloyd and others q alg for matrix inversion ). I can see the circuit-level structure for the code. I can count the circuits necessary for HHL. Then I have 1400 CLOPS to see how many seconds for x # of circuits. Done!

• "interesting" should have been inserting. Damn spell checker. Feb 23, 2023 at 16:12
• hi. Please note that you can, and are encouraged to, edit the post to ament any typos or mistakes. It is also currently not very clear whether you are answering the question, or you're posing a different question. In the latter case, please ask the question as a separate post, as this space is exclusively devoted to answers directly addressing the original question
– glS
Feb 23, 2023 at 16:17