You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IBM hardware and the primitives interfaces are defined only in terms of returning values in classical registers, not arbitrary Vars
Qiskit's QuantumCircuit and DAGCircuit data structures are both defined in terms of individual, compile-time known references to individual qubits and clbits, meaning that the storage location of a Measuremust be a clbit with an integer-literal index
There are ways around this, such as by instead rewriting the circuit as
OPENQASM 3.0;
bit tmp;
bit[1000] reps;
for uint i in [0:999] {
tmp = measure $0;
reps[i] = tmp;
}
This is representable in current Qiskit, but the potential trouble is that the number of reps might want to be very large (let's say order of 1 million, for sake of argument), and this would imply that the ForLoopOp in such a circuit will act on 1,000,001 classical bits and have that many incoming and outgoing wires.
We should investigate what the best way to do this and to represent such circuits is. We should take care that any solution we can propose will scale to 1million+ iterations.
For QEC research purposes, there is a desire to be able to represent structures like
This is not easily possible in Qiskit. There are a couple of concerns:
Parameterand will need to be able to beVarinstead (related: Add real-time Var support for ForLoopOp range #13729)VarsQuantumCircuitandDAGCircuitdata structures are both defined in terms of individual, compile-time known references to individual qubits and clbits, meaning that the storage location of aMeasuremust be a clbit with an integer-literal indexThere are ways around this, such as by instead rewriting the circuit as
This is representable in current Qiskit, but the potential trouble is that the number of reps might want to be very large (let's say order of 1 million, for sake of argument), and this would imply that the
ForLoopOpin such a circuit will act on 1,000,001 classical bits and have that many incoming and outgoing wires.We should investigate what the best way to do this and to represent such circuits is. We should take care that any solution we can propose will scale to 1million+ iterations.