How can i get the expanded/final circuit that will be ran on the device?

I am testing different fake providers provided qiskit and trying to find a custom mapping/transpilation that may perform better than the default transpilation.

Example, here is circuit:

from qiskit.providers.fake_provider import FakeGuadalupeV2
import qiskit_aer.noise as noise
import pennylane as qml

noisemodel=noise.NoiseModel.from_backend(FakeGuadalupeV2())
m=4
dev=qml.device("qiskit.aer",wires=m,backend="aer_simulator_statevector",noise_model =noisemodel,shots=10)
@qml.qnode(dev)
def circuit(inputs,weights):
    for i in range(m):
      qml.RY(inputs[i],wires=i)
    for i in range(m):
      qml.RZ(inputs[m+i],wires=i)
    for i in range(m):
      qml.RX(inputs[2*m+i],wires=i)
    for i in range(m):
      qml.RY(inputs[3*m+i],wires=i)

    qml.BasicEntanglerLayers(weights, wires=range(m))

    return [qml.expval(qml.PauliZ(i)) for i in range(m)]

Now, I want to know that when ever I use this circuit, which qubits in my designed circuit will be mapped to which of the qubit in the system FakeGuadalupeV2. And also the final decomposed circuit, as no device have all quantum gates and they are applied using some combination of available gates on the system.

Hey @Abhijeet_Panihar!

There’s a few related discussion posts:

Let me know if any of these help! You might also need to do some digging into the Qiskit documentation for other backend and transpile options.

is similar to what I am trying to do, cant we import decomposition provided by qiskit library or IBM device for all gates?

Great question! If I’m understanding your questions correctly, then I think this is the time to consult the Qiskit documentation. This is where the documentation for, say, the Aer device — AerDevice — PennyLane-Qiskit 0.34.0-dev documentation — points you to.

Please refer to the Qiskit documentation for further information on the noise model, backend options and transpile options. A range of backend_options that will be passed to the simulator and a range of transpile options can be given as kwargs.

Let me know if this helps!