PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.
I simulate a VQE of the H2 molecule using the UCCSD ansatz from pennylane qchem with the 'default.qubit' device. I want to draw the circuit as it is executed on the device by using draw_mpl() with the expasion_strategy='device'. I expect to get a figure of the circuit in terms of CNOT, RZ, X and H gates.
Actual behavior
Instead I get a circuit as if I had not specified the expansion strategy, i.e. a figure one gate on all qubits called UCCSD.
Additional information
When using draw() for the exact same circuit I get the gates that I would have expected.
Expected behavior
I simulate a VQE of the H2 molecule using the UCCSD ansatz from pennylane qchem with the 'default.qubit' device. I want to draw the circuit as it is executed on the device by using
draw_mpl()
with theexpasion_strategy='device'
. I expect to get a figure of the circuit in terms of CNOT, RZ, X and H gates.Actual behavior
Instead I get a circuit as if I had not specified the expansion strategy, i.e. a figure one gate on all qubits called UCCSD.
Additional information
When using
draw()
for the exact same circuit I get the gates that I would have expected.Source code
Tracebacks
No response
System information
Existing GitHub issues