Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/openfermion/ops/representations/polynomial_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Base class for representating operators that are polynomials in the
"""Base class for representing operators that are polynomials in the
fermionic ladder operators."""

import copy
Expand Down
8 changes: 4 additions & 4 deletions src/openfermion/ops/representations/quadratic_hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def ground_energy(self):
return numpy.sum(orbital_energies[numpy.where(orbital_energies < 0.0)[0]]) + constant

def majorana_form(self):
r"""Return the Majorana represention of the Hamiltonian.
r"""Return the Majorana representation of the Hamiltonian.

Any quadratic Hamiltonian can be written in the form

Expand Down Expand Up @@ -317,9 +317,9 @@ def index_map(i):
orbital_energies = numpy.concatenate((up_orbital_energies, down_orbital_energies))
diagonalizing_unitary_T = numpy.zeros((n_modes, n_modes), dtype=complex)
diagonalizing_unitary_T[: n_modes // 2, : n_modes // 2] = up_diagonalizing_unitary_T
diagonalizing_unitary_T[
n_modes // 2 :, n_modes // 2 :
] = down_diagonalizing_unitary_T
diagonalizing_unitary_T[n_modes // 2 :, n_modes // 2 :] = (
down_diagonalizing_unitary_T
)
else:
orbital_energies, diagonalizing_unitary_T = numpy.linalg.eigh(matrix)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def qubit_operator_to_pauli_sum(
pauli_sum (PauliSum): cirq PauliSum object.
Raises:
TypeError: if qubit_op is not a QubitOpertor.
TypeError: if qubit_op is not a QubitOperator.
"""
if not isinstance(operator, QubitOperator):
raise TypeError('Input must be a QubitOperator.')
Expand Down
Loading