openfermion.hamiltonians.majorana_operator
Initialize a Majorana operator.
openfermion.hamiltonians.majorana_operator(
term: Optional[Union[Tuple[int, int], str]] = None, coefficient=1.0
) -> openfermion.ops.FermionOperator
Args |
term
|
tuple or string
The first element of the tuple indicates the
mode on which the Majorana operator acts, starting from zero.
The second element of the tuple is an integer, either 0 or 1,
indicating which type of Majorana operator it is:
Type 0: \\(a^\dagger_p + a_p\\)
Type 1: \\(i (a^\dagger_p - a_p)\\)
where the \\(a^\dagger_p\\) and \\(a_p\\) are the usual
fermionic ladder operators.
Alternatively, one can provide a string such as 'c2', which
is a Type 0 operator on mode 2, or 'd3', which is a Type 1
operator on mode 3.
Default will result in the zero operator.
|
coefficient
|
complex or float, optional
The coefficient of the term.
Default value is 1.0.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]