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
In the below code, I am getting an error like TypeError: FermionicOp.init() got an unexpected keyword argument 'register_length'.
Why is not taking in register_length?What corrections should I make to the code?
How can we reproduce the issue?
''' N_sites = 5
hopping_terms = []
for ii in range (N_sites - 1):
hopping_terms.append(sum(FermionicOp(label,register_length = N_sites)
for label in ["+%i -%i" % (ii, ii+1),
"+%i -%i" % (ii+1, ii)])) '''
What should happen?
The code should create the fermionic operators for a given system of linear lattice with 5 sites. But, it is showing error in accepting the register_length keyword.
Any suggestions?
No response
The text was updated successfully, but these errors were encountered:
Environment
What is happening?
In the below code, I am getting an error like TypeError: FermionicOp.init() got an unexpected keyword argument 'register_length'.
Why is not taking in register_length?What corrections should I make to the code?
How can we reproduce the issue?
''' N_sites = 5
hopping_terms = []
for ii in range (N_sites - 1):
hopping_terms.append(sum(FermionicOp(label,register_length = N_sites)
for label in ["+%i -%i" % (ii, ii+1),
"+%i -%i" % (ii+1, ii)])) '''
What should happen?
The code should create the fermionic operators for a given system of linear lattice with 5 sites. But, it is showing error in accepting the register_length keyword.
Any suggestions?
No response
The text was updated successfully, but these errors were encountered: