-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
Description
On branch refactor_again, setting base_oracle = XXZ_EvolutionOracle.from_nqubits(nqubits=5, delta=0.5, steps=3, order=1)
I believe that https://github.com/qiboteam/boostvqe/blob/e5d458d5d591530f24ce87510d90608991c640da/src/boostvqe/models/dbi/double_bracket_evolution_oracles.py#L274C1-L295C10
is not passing steps and order
since

This will cause the oracle's circuit to be different from nqubit_XXZ_decomposition. To see this, you may run
from qibo import hamiltonians
import numpy as np
from boostvqe.compiling_XXZ import *
t = 0.01
steps = 3
delta = 0.5
nqubits = 5
order = 1
h_xxz = hamiltonians.XXZ(nqubits=nqubits, delta = delta)
base_oracle = XXZ_EvolutionOracle.from_nqubits(
nqubits=nqubits, delta=delta, steps=steps, order=1
)
diff_norms = []
times = np.linspace(0,3,30)
for t in times:
u = h_xxz.exp(t)
circ = nqubit_XXZ_decomposition(nqubits=nqubits, t=t, delta=delta, steps=steps, order=order)
diff_norms.append(np.linalg.norm(base_oracle.circuit(t).unitary() - circ.unitary()))
import matplotlib.pyplot as plt
plt.plot(times, diff_norms)Reactions are currently unavailable
