I'm currently implementing some algorithms on IBM quantum devices. After the migration to qiskit 1.0, I started using primitives and SamplerV2.
What I observed is that even if I manually select a specific initial mapping of virtual qubits to virtual ones to minimize circuit depth, once I run the circuit the metrics of the job tell me that actually a circuit of bigger depth has been run. The circuit is already expressed in terms of native gates.
In fact, in general, I'm getting more noisy results with respect to other computations I did pre-migration.
After various attempts, it seems to me that SamplerV2 is modifying in some way the circuit and I would like to understand how to avoid this.
Does someone know if this is what is really happening and how to solve the problem?
Thanks!
pm=generate_preset_pass_manager(backend=backend,initial_layout=[0,1,2,3,4, 61,60,53,41,40])
. where the mapping is defined in initial_layout. When I define the circuit qc, I transpile it usingpm.run(qc)
. I call the sampler assampler = Sampler(backend=backend)
andrun job=sampler.run(qc,shots=20000)
$\endgroup$