0
$\begingroup$

Following the qiskit tutorial on Variational Time Evolution, I've changed the ansatz for VarQRTE from

ansatz = EfficientSU2(hamiltonian.num_qubits, reps=1)

to

from qiskit.circuit.library import EfficientSU2, TwoLocal    
ansatz = TwoLocal(hamiltonian.num_qubits, 'ry', 'cz', reps=1)

Plotting the magnetization, I get

Plot of magnetization against time for SU2(blue) and TwoLocal (Orange) ansatze.

Looking at how the variational parameters change during evolution by

for i in range(0, len(evolution_result_TwoLocal.parameter_values)):
    print("parameters", i, evolution_result_TwoLocal.parameter_values[i])

I note that the parameters are not changing.

parameters 0 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 1 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 2 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 3 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 4 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 5 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 6 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 7 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 8 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 9 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 10 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 11 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 12 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 13 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 14 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 15 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 16 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 17 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 18 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 19 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 20 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 21 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 22 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 23 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 24 [1.57079633 1.57079633 1.57079633 1.57079633]
...
parameters 998 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 999 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 1000 [1.57079633 1.57079633 1.57079633 1.57079633]
parameters 1001 [1.57079633 1.57079633 1.57079633 1.57079633]

Is there an easy resolution?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.