We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SymbolicHamiltonian
I noticed that there is a nice feature of adding symbolic Hamiltonians but for many applications adding after rescaling by scalars is also useful.
Example
import qibo from qibo.symbols import * from qibo.hamiltonians import SymbolicHamiltonian # works h1 = SymbolicHamiltonian( Z(0), nqubits = 2) h2 = SymbolicHamiltonian( Z(1), nqubits = 2) h12 = h1 + h2 print(h12.form) # works h12 = SymbolicHamiltonian( 0.1 * Z(0) + 0.2 * Z(1), nqubits = 2) print(h12.form) # fails h12 = 0.1 * h1 + 0.2 * h2
The error message is inaccurate because both Hamiltonians had the same nqubits
nqubits
[Qibo 0.2.12|ERROR|2024-11-07 10:40:47]: Only hamiltonians with the same number of qubits can be added.
The text was updated successfully, but these errors were encountered:
SymbolicHamiltonian.__mul__
@marekgluza the fix is in #1517
Sorry, something went wrong.
renatomello
Successfully merging a pull request may close this issue.
I noticed that there is a nice feature of adding symbolic Hamiltonians but for many applications adding after rescaling by scalars is also useful.
Example
The error message is inaccurate because both Hamiltonians had the same
nqubits
The text was updated successfully, but these errors were encountered: