You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I receive the following error when trying to create a fermi hubbard qsvt circuit with linear T encoding:
pyLIQTR/BlockEncodings/LinearT.py:25
init__(self, ProblemInstance, approx_error, energy_error, **kwargs)
22 super().__init__(ProblemInstance,**kwargs)
24 self._encoding_type = VALID_ENCODINGS.LinearT
---> 25 self._num_coeffs = 3*2*self.PI._N # factor of 3 for T,U,V. Factor of 2 for spin
27 if energy_error is not None:
28 self.approx_error = self.get_approx_error(energy_error)
AttributeError: 'FermiHubbard' object has no attribute '_N'
Example to reproduce:
from pyLIQTR.ProblemInstances.getInstance import getInstance
from pyLIQTR.clam.lattice_definitions import SquareLattice
from pyLIQTR.BlockEncodings.getEncoding import getEncoding, VALID_ENCODINGS
from pyLIQTR.qubitization.qsvt_dynamics import qsvt_dynamics, simulation_phases
# Create Fermi-Hubbard Instance
J = -1.0
N = 2
U = 8.0
eps = 0.025
model = getInstance("FermiHubbard", shape=(N, N), J=J, U=U, cell=SquareLattice)
times = 1.0
eps = eps
phases = simulation_phases(times, eps=eps, precompute=False, phase_algorithm="optimization")
gate_qsvt = qsvt_dynamics(encoding=getEncoding(VALID_ENCODINGS.LinearT), instance=model, phase_sets=phases)
The text was updated successfully, but these errors were encountered:
The LinearT encoding is for the broader electronic structure problems, so it doesn't currently work with the FermiHubbard instance. To get the specialized Fermi Hubbard encoding (which is also from the linear T paper) you can use VALID_ENCODINGS.FermiHubbardSquare.
I realize this is not clear from the error you receive so we'll work on fixing that.
The LinearT encoding is for the broader electronic structure problems, so it doesn't currently work with the FermiHubbard instance. To get the specialized Fermi Hubbard encoding (which is also from the linear T paper) you can use VALID_ENCODINGS.FermiHubbardSquare.
I realize this is not clear from the error you receive so we'll work on fixing that.
Ok great! I suspected I was using it improperly. Thanks for the great work and quick response!
pyLIQTR version: v1.3.3
Cpu: Mac M1
I receive the following error when trying to create a fermi hubbard qsvt circuit with linear T encoding:
pyLIQTR/BlockEncodings/LinearT.py:25
Example to reproduce:
The text was updated successfully, but these errors were encountered: