General methods for second quantized operators
See original GitHub issueWhat is the expected enhancement?
There is some general functionality which would be nice to have for all types of second-quantized ops:
- Checks for hermiticity of an operator (Is the operator equivalent to its adjoint)?
- A direct way to compute commutators, and checks for commutativity.
- I think it would be nice to also have a
.to_matrix
method for theFermionicOp
as is already in place for theSpinOp
. - For the
.to_matrix()
methods it would be nice to return a sparse datatype such as one of thescipy.sparse
formats likecsc
. Maybe this could be its own method.to_sparse_matrix()
.
Points 1. and 2. should be straightforward to implement with the current arithmetics already in place.
For 3. one needs to make a choice whether to use the full Fock space (with varying particle number) as a basis or only a certain particle-number (and fixed spin?) subspace. It might be nice to have this be specified by the user.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Second quantization - Wikipedia
Second quantization, also referred to as occupation number representation, is a formalism used to describe and analyze quantum many-body systems.
Read more >“Second quantization” (the occupation-number representation)
The second quantization method involves the use of so-called creation and annihilation oper- ators. These operators respectively create and ...
Read more >Chapter 2 Second Quantisation - Theory of Condensed Matter
Second quantisation provides a basic and efficient language in which to formulate many- particle systems.
Read more >Second Quantization
The essential step in the second quanti- zation is the introduction of so-called creation and annihilation operators. By doing this, we eliminate the...
Read more >Second Quantization
CREATION AND ANNIHILATION OPERATORS IN QUANTUM MECHANICS3 ... We will now discuss a procedure, known as Second Quantization, which will.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay so in summary, I think what we want to implement is:
Hermiticity checks for all SecondQuantizedOps
SecondQuantizedOp.is_hermite() -> bool
A way to compute commutators such as
commutator(op1: SecondQuantizedOp, op2: SecondQuantizedOp).is_zero()
.to_matrix()
-method forFermionicOp
over the full Fock basisscipy.sparse representations of the matrices for
FermionicOp
andSpinOp
, e.g. with parameterto_matrix(sparse: bool)
After an offline discussion with @ikkoham I think I could take care of these (this would also be a good learning opportunity for me to get into the workflow). Should I open a new issue for each of these points or can we use this issue to keep track of the changes?
Thank you for nice suggestion.
SecondQuantizedOp.is_hermite() -> bool
is nice!We have two choices.
SecondQuantizedOp.is_commutative(op: SecondQuantizedOp) -> bool
commutator(op1: SecondQuantizedOp, op2: SecondQuantizedOp).is_zero()
. I’ve made this in opflow.The basis of
FermionicOp.to_matrix()
isn’t trivial as you said. Which basis is convenient for chemistry users?Nice. See https://github.com/Qiskit/qiskit-nature/blob/master/qiskit_nature/operators/second_quantization/spin_op.py#L439. This parameter is same with quantum_info.Pauli.