Closed ajavadia closed 6 years ago
How would be the API of this? Do we want to make it explicit or auto-detected? Similarly to #695, I would not extend the Qobj
container; this is an optimization happening in the transpilation pipeline and should live there.
@ajavadia lets talk in person as this is related to the last one and when we start to have relations between the circuits we need to have a real quantum program not just a hack.
After in-person discussions, I am closing this issue. We agreed that Qobj should be the container that we send to backends, and is final. We want to do most of the modifications in QuantumCircuit
, and in cases of requiring finer control (e.g. for speed in this case), we can make modifications in DAGCircuit
.
What is the expected behavior?
A typical scenario in variational algorithms is that many circuits get compiled, which have the same skeleton and only differ in some rotation angles. These should not independently go through the compilation process. It would be much faster to compile the 1st circuit into a
Qobj
, then modify thatQobj
in-place to create otherQobj
s for circuits 2 .. 1000. This eliminates the overhead of building newQuantumCircuits
and compiling them.