Comments (10)
I'll work on implementing this. I'm new to OpenFermion and would like to get familiar with the code.
from openfermion.
I had this issue in mind while completing #194 so I did it in a way that made this task easy to incorporate. Basically you just fill in the body of _long_string_init
in ops/_symbolic_operator.py
. @max-radin, are you okay with doing it this way?
from openfermion.
Yes that makes sense to me. I have written some code for long string initialization in FermionOperator that I can move into _long_string_init
.
from openfermion.
Great. Keep in mind that the task now is basically to reverse-engineer the __str__
method of SymbolicOperator, which now uses the attributes action
and action_string
. You may want to take advantage of the method _parse_string
. Let me know if you have any questions.
from openfermion.
Closed by #201
from openfermion.
my_operator = FermionOperator('1.7 [3^ 2] - 8 [4^]')
seems to throw an error whereas
my_operator = FermionOperator('1.7 [3^ 2] + 8 [4^]')
and
my_operator = FermionOperator('1.7 [3^ 2] -8 [4^]')
and
my_operator = FermionOperator('1.7 [3^ 2] + -8 [4^]')
do not. I guess subtraction is not supported as expected? @max-radin can you assist with this?
from openfermion.
Also, it seems to always assume numbers are complex, for instance
my_operator = FermionOperator('-1.7 [3^ 2] + 8.0 [4^]') print(my_operator)
returns
(-1.7+0j) [3^ 2] + (8+0j) [4^]
from openfermion.
Also, I am not sure how one is supposed to provide complex coefficients.
my_operator = FermionOperator('(2.3 + 1.7j) [3^ 2]')
throws an error.
from openfermion.
Yes I'll fix these issues shortly. Evidently, the complex
initializer does not support white space, so you'd have to write '(2.3+1.7j) [3^ 2]'
.
from openfermion.
Thanks Max! I think we should try to be flexible with respect to the white space.
from openfermion.
Related Issues (20)
- Help with one-body and two-body coefficients for orbital removal
- UHF energy with openfermion HOT 1
- scipy > 1.9.3 breaks QuarticFermionicSimulationGate decompose method. HOT 5
- Incorrect Bounds on Trotter Error
- Incorrect formula to calculate required Trotter steps HOT 1
- Resource estimation code not tested as part of the CI
- Should move to black for formatting.
- Why does MajoranaOperator not subclass SymbolicOperator? HOT 1
- Some inconsistencies in molecular single factorization costings HOT 1
- Inconsistencies in the double factorized chemistry resource estimate costing function
- 91 tests fail HOT 7
- Nightly tests are broken HOT 1
- slight modification to function generate_hamiltonian ?
- Operation between MajoranaOperator and numbers? HOT 5
- QuadraticFermionicSimulationGate tests fail with cirq == 1.3.0 HOT 5
- Hubbard model notebook is flaky
- Trotter evolution time may be off by a factor of 2 HOT 2
- 1 test fails HOT 1
- get_sparse_operator fails on non-simplified QubitOperators
- Bad behavior when working with sympy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfermion.