1) While defining a circuit on QISkit, does q[0] always correspond to the same qubit on a device
(e.g. the qubit labeled q0 on the device manual)? If so, how can I only use for example qubit 12 and
13 of ibmq_16_melbourne (just as an example)?
Quick answer: not always.
The way Qiskit works with quantum circuit and backends is:
- Generate the quantum circuit with the API. The quantum circuit is stored in a
QuantumCircuit
object.
- Transform this
QuantumCircuit
object into a DAGCircuit
object which represents the same quantum circuit but uses a DAG instead of a list of gates.
- Give this
DAGCircuit
object to the compiler. The compiler takes care of multiple things:
- Respecting the topology of the backend you are compiling for. This is the step that will bother you as the compiler will probably "shuffle" (not in a random way of course) your qubits. One exception I see is when the circuit already respects the backend topology. In this case the compiler may not change the qubits.
- Respecting the basis gates used by the backend.
- Optimising your circuit. This step might also be problematic. I don't know if such an optimisation is present in the Qiskit compiler, but if the compiler tries to optimise also with respect to the errors rates then you might end up with "shuffled" qubits.
You will need to check what I am saying experimentally.
2) If one job is being executed on a device, say for instance using 3 qubits, is any other job being
ran on that device at the same time?
It seems unlikely to me but lets wait for the answer of one of the developers of Qiskit.
3) How many CNOT gates one circuit can have so that its error stays reasonable? Basically, how
deep can a circuit be on any of the devices to get a reasonable result?
Very few.
If you limit yourself to Q12
and Q13
then the CX
gate between the two has a probability of failure of 0.041. This means that applying only CX
gates, you have a probability of success of $(1 - 0.041)^n$ with $n$ being the number of CX
gates applied. For $10$ CX
gates, the probability is $\approx 0.66$. For $20$ gates, the probability of success drops to $\approx 0.43$.