Flow freezes when there are 2 quantum circuit
Bug Description
When two quantum circuits start sending messages at the same time the flow freezes.
Steps to Reproduce Bug
Connect two quantum circuit nodes to the inject node and start the flow, as in picture:

Expected Behaviour & Actual Behaviour
Expected behavior is that debug node would receive as many qubit payload objects as there are qubits in both circuits. Actual behavior is freezing of the flow.
Additional Information
System Information
- Node.js Version:v12.22.1
- Operating System:Darwin tma.local 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64
For now, 'Node-RED Quantum' requires the user to have a single quantum circuit at a time, but as many quantum algorithms nodes at a time.
Then, @KhesimReid , we don’t need to test scenario when qubits come from different circuits?
Then, @KhesimReid , we don’t need to test scenario when qubits come from different circuits?
Well, the error handling is here in case the user creates 2 quantum circuits regardless. Not sure if we really need to test it though.
Then, @KhesimReid , we don’t need to test scenario when qubits come from different circuits?
Well, the error handling is here in case the user creates 2 quantum circuits regardless. Not sure if we really need to test it though.
The test would have been to ensure that the error handling works appropriately, since having the correct errors returned to the users is very important so that they don't get confused when things go wrong. However, given the time left, if the issue prevents the tests from being written then I wouldn't worry about doing it now.
This issue happens because all quantum circuits use the same Python shell instance. However, what we can perhaps do is create separate shell instances for every circuit and store it in the global state manager.
This would have been nice, since circuits should be independent of each other.