Wrong time value in Trotterized unitary
See original GitHub issueEnvironment
- Qiskit Terra version: 0.36.0
- Python version: 3.8.8
- Operating system: Mac 11.6.5
What is happening?
Computing a suzuki decomposition of a Hamiltonian for a given time t. If t is a float, everything works fine. If t is a Parameter object the value gets squared when it is bound.
How can we reproduce the issue?
from qiskit.opflow import X, Z, Suzuki
from qiskit.circuit import Parameter
time = 11.0
H = (X^X^X) + (Z^Z^Z)
U1 = Suzuki(1, order=1).convert(time * H)
print(U1)
t = Parameter('t')
U2 = Suzuki(1, order=1).convert(t * H)
U2_t = U2.bind_parameters({t:time})
print(U2_t)
which outputs on my device
ComposedOp([
e^(-i*11.0 * XXX),
e^(-i*11.0 * ZZZ)
])
ComposedOp([
e^(-i*121.0 * (
1.0 * XXX
)),
e^(-i*121.0 * (
1.0 * ZZZ
))
])
What should happen?
What should happen is when the time value is bound to the Parameter object, it should show 11.0 inside the exponential, not 121.0.
Any suggestions?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Ordering of Trotterization: Impact on Errors in Quantum ... - NCBI
The expectation value of the qubit Hamiltonian with this state is ... Firstly, the error will decrease with the number of time steps...
Read more >Describing Trotterized Time Evolutions on Noisy Quantum ...
To perform such a digital simulation, the unitary time evolution is approximated ... in the Trotterized time evolution can be efficiently.
Read more >Trotter Errors from Dynamical Structural Instabilities of Floquet ...
This results in a time evolution operator that is very different from ... changes in the phase-space structure of the Trotterized unitary.
Read more >Trotterization in QM Theory 1 Introduction
energy values and the stationary states of the physical system. To get the time-dependant eigenvector |Ψ(t)〉, one needs the unitary ...
Read more >Quantum localization bounds Trotter errors in digital ... - Science
This Trotterization comes inherently with an error that can be rigorously upper bounded via the accuracy of the global unitary time-evolution operator (3)....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I tried coeff = 1 instead of operator.coeff = 1. This solution works in my local qiskit terra. I will try to make with this solution my first contribution.
1 ComposedOp([ e^(-i*11.0 * XXX), e^(-i*11.0 * ZZZ) ]) 1 ComposedOp([ e^(-i*11.0 * ( 1.0 * XXX )), e^(-i*11.0 * ( 1.0 * ZZZ )) ])
Thanks for reporting this @ajrazander!
You can also use the
PauliEvolutionGate
instead, which we will shift to in the future 🙂