# How many classical registers are there on (IBM) quantum computers?

I have a circuit where I only use 3 qubits but need to utilize hundreds of classical registers. My questions are: what is the maximum number of classical bits on the current IBM Qs? What is the quantum computer with the highest number of classical bits right now that is available for researchers and the public?

• What do you need the large amount of classical registers for? I think your question may get answered more directly if we know what it is you want to do. – Matthew Stypulkoski Sep 25 '19 at 13:58
• I'm doing sort of like a Quantum Zeno effect on qubit: I want to keep track of whether a qubit will turn to |1> after a certain amount of gates. It's possibly much better if there's a measurement gate that will read the qubit and fix the classical register as |1> forever once it caught the qubit at |1> state. Is there such a method? – Kim Dong Sep 25 '19 at 16:40

## 3 Answers

As far as I am aware you can have as many ClassicalRegisters as you need, assuming they fit in the memory of the classical device controlling the Quantum Computer. I would suggest trying to reuse them if possible if you are concerned about this!

• But I tried the circuit on the ibmqx2 and it returns ERROR_RUNNING_JOB. Try a simpified version of the circuit with only 6 classical bit on the Melbourne and it works, so it's not the circuit fault I think – Kim Dong Sep 25 '19 at 16:42
• If you are using the circuit you have now put in the description the error is because you are doing operations on qubits after measuring them - this is not allowed on the devices at the moment. It may be possible using the simulator, you could add a noise model to it to make it behave more like a real quantum computer. – met927 Sep 25 '19 at 20:04
• Funnily enough, as I said, I ran the above circuit on the Melbourne and it (technically) worked and returned a result. So I hope to at least get a result from the other machine... – Kim Dong Sep 26 '19 at 8:08

Why do you need so many classical registers? One usually only uses them to catch the measurement at the end of the quantum algorithm; one for every qubit. If you do repeated measurements and intend to store statistics in separate classical registers, then you can better repeat the whole experiment. There is also on option to keep individual result of every single experiment (memory=true). Your quantum code is part of a larger whole where you mix classical and quantum computing. In the classical code (probably python) you can store any amount of data in standard facilities like lists.

• I'm doing sort of like a Quantum Zeno effect on qubit: I want to keep track of whether a qubit will turn to |1> after a certain amount of gates. It's possibly much better if there's a measurement gate that will read the qubit and fix the classical register as |1> forever once it caught the qubit at |1> state. I put an edit on the question. Is there such a method? – Kim Dong Sep 25 '19 at 16:35

The problem with your circuit is not the number of classical bits. There is no practical limit to those. The circuit that you have drawn will not run because you are doing repeated measurements on a single qubit. This is not supported on any IBM machine currently available (this would require new control electronics for operating the qubits).