kevinsung: Another coveralls false positive.
diff --git a/src/openfermion/transforms/_bravyi_kitaev.py b/src/openfermion/transforms/_bravyi_kitaev.py
index 6007dcf..f999465 100644
--- a/src/openfermion/transforms/_bravyi_kitaev.py
+++ b/src/openfermion/transforms/_bravyi_kitaev.py
@@ -12,7 +12,7 @@
 
 """Bravyi-Kitaev transform on fermionic operators."""
 
-from openfermion.ops import QubitOperator
+from openfermion.ops import FermionOperator, MajoranaOperator, QubitOperator
 from openfermion.utils import count_qubits, inline_sum
 
 
@@ -40,20 +40,12 @@ def bravyi_kitaev(operator, n_qubits=None):
     Raises:
         ValueError: Invalid number of qubits specified.
     """
-    # Compute the number of qubits.
-    if n_qubits is None:
-        n_qubits = count_qubits(operator)
-    if n_qubits < count_qubits(operator):
-        raise ValueError('Invalid number of qubits specified.')
-
-    # Compute transformed operator.
-    transformed_terms = (
-        _transform_operator_term(term=term,
-                                 coefficient=operator.terms[term],
-                                 n_qubits=n_qubits)
-        for term in operator.terms
-    )
-    return inline_sum(summands=transformed_terms, seed=QubitOperator())
+    if isinstance(operator, FermionOperator):
+        return _bravyi_kitaev_fermion_operator(operator, n_qubits)
+    if isinstance(operator, MajoranaOperator):
+        return _bravyi_kitaev_majorana_operator(operator, n_qubits)
+    raise TypeError("Couldn't apply the Bravyi-Kitaev Transform to object "
+                    "of type {}.".format(type(operator)))
 
 
 def _update_set(index, n_qubits):
@@ -105,6 +97,52 @@ def _parity_set(index):
     return indices
 
 
+def _bravyi_kitaev_majorana_operator(operator, n_qubits):
+    # Compute the number of qubits.
+    N = count_qubits(operator)
+    if n_qubits is None:
+        n_qubits = N
+    if n_qubits < N:
+        raise ValueError('Invalid number of qubits specified.')
+
+    # Compute transformed operator.
+    transformed_terms = (
+        _transform_majorana_term(term=term,
+                                 coefficient=coeff,
+                                 n_qubits=n_qubits)
+        for term, coeff in operator.terms.items()
+    )
+    return inline_sum(summands=transformed_terms, seed=QubitOperator())
+
+
+def _transform_majorana_term(term, coefficient, n_qubits):
+    # Build the Bravyi-Kitaev transformed operators.
+    transformed_ops = (
+        _transform_majorana_operator(majorana_index, n_qubits)
+        for majorana_index in term
+    )
+    return inline_product(factors=transformed_ops,
+                          seed=QubitOperator((), coefficient))
+
+
+def _transform_majorana_operator(majorana_index, n_qubits):
+    q, b = divmod(majorana_index, 2)
+
+    update_set = _update_set(q, n_qubits)
+    occupation_set = _occupation_set(q)
+    parity_set = _parity_set(q - 1)
+
+    if b:
+        return QubitOperator(
+                [(q, 'Y')] +
+                [(i, 'X') for i in update_set - {q}] +
+                [(i, 'Z') for i in (parity_set ^ occupation_set) - {q}])
+    else:
+        return QubitOperator(
+                [(i, 'X') for i in update_set] +
+                [(i, 'Z') for i in parity_set])
+
+
 def _transform_operator_term(term, coefficient, n_qubits):
     """
     Args:
@@ -123,7 +161,24 @@ def _transform_operator_term(term, coefficient, n_qubits):
     )
     return inline_product(factors=transformed_ladder_ops,
                           seed=QubitOperator((), coefficient))
-                          
+
+
+def _bravyi_kitaev_fermion_operator(operator, n_qubits):
+    # Compute the number of qubits.
+    N = count_qubits(operator)
+    if n_qubits is None:
+        n_qubits = N
+    if n_qubits < N:
+        raise ValueError('Invalid number of qubits specified.')
+
+    # Compute transformed operator.
+    transformed_terms = (
+        _transform_operator_term(term=term,
+                                 coefficient=operator.terms[term],
+                                 n_qubits=n_qubits)
+        for term in operator.terms
+    )
+    return inline_sum(summands=transformed_terms, seed=QubitOperator())
 
 
 def _transform_ladder_operator(ladder_operator, n_qubits):
diff --git a/src/openfermion/utils/_operator_utils.py b/src/openfermion/utils/_operator_utils.py
index dc7af40..f36bdf5 100644
--- a/src/openfermion/utils/_operator_utils.py
+++ b/src/openfermion/utils/_operator_utils.py
@@ -11,7 +11,7 @@
 #   limitations under the License.
 
 """This module provides generic tools for classes in ops/"""
-from __future__ import absolute_import
+from __future__ import absolute_import, division
 from builtins import map, zip
 import copy
 import itertools
@@ -28,6 +28,7 @@ from openfermion.ops import (BosonOperator,
                              FermionOperator,
                              InteractionOperator,
                              InteractionRDM,
+                             MajoranaOperator,
                              QuadOperator,
                              QubitOperator,
                              PolynomialTensor)
@@ -326,6 +327,15 @@ def count_qubits(operator):
                     num_qubits = term[-1][0] + 1
         return num_qubits
 
+    # Handle MajoranaOperator.
+    if isinstance(operator, MajoranaOperator):
+        num_qubits = 0
+        for term in operator.terms:
+            for majorana_index in term:
+                if numpy.ceil((majorana_index+1) / 2) > num_qubits:
+                    num_qubits = int(numpy.ceil((majorana_index+1) / 2))
+        return num_qubits
+
     # Handle DiagonalCoulombHamiltonian
     elif isinstance(operator, DiagonalCoulombHamiltonian):
         return operator.one_body.shape[0]

Implement Bravyi-Kitaev Transform for MajoranaOperator
diff --git a/src/openfermion/transforms/_bravyi_kitaev_test.py b/src/openfermion/transforms/_bravyi_kitaev_test.py
index 33db57d..834c5b4 100644
--- a/src/openfermion/transforms/_bravyi_kitaev_test.py
+++ b/src/openfermion/transforms/_bravyi_kitaev_test.py
@@ -18,8 +18,10 @@ import unittest
 import numpy
 
 from openfermion.ops import (FermionOperator,
+                             MajoranaOperator,
                              QubitOperator)
-from openfermion.transforms import bravyi_kitaev, jordan_wigner
+from openfermion.transforms import (
+        bravyi_kitaev, get_fermion_operator, jordan_wigner)
 from openfermion.utils import eigenspectrum, number_operator
 
 
@@ -68,6 +70,8 @@ class BravyiKitaevTransformTest(unittest.TestCase):
     def test_bk_n_qubits_too_small(self):
         with self.assertRaises(ValueError):
             bravyi_kitaev(FermionOperator('2^ 3^ 5 0'), n_qubits=4)
+        with self.assertRaises(ValueError):
+            bravyi_kitaev(MajoranaOperator((2, 3, 9, 0)), n_qubits=4)
 
     def test_bk_jw_number_operator(self):
         # Check if number operator has the same spectrum in both
@@ -186,3 +190,13 @@ class BravyiKitaevTransformTest(unittest.TestCase):
         bk_spectrum = eigenspectrum(bk_qubit_operator)
         self.assertAlmostEqual(0., numpy.amax(numpy.absolute(jw_spectrum -
                                               bk_spectrum)), places=5)
+    def test_bk_bad_type(self):
+        with self.assertRaises(TypeError):
+            bravyi_kitaev(QubitOperator())
+
+
+def test_bravyi_kitaev_majorana_op_consistent():
+    op = (MajoranaOperator((1, 3, 4), 0.5)
+          + MajoranaOperator((3, 7, 8, 9, 10, 12), 1.8)
+          + MajoranaOperator((0, 4)))
+    assert bravyi_kitaev(op) == bravyi_kitaev(get_fermion_operator(op))
diff --git a/src/openfermion/utils/_operator_utils_test.py b/src/openfermion/utils/_operator_utils_test.py
index 612467b..ae4a2d4 100644
--- a/src/openfermion/utils/_operator_utils_test.py
+++ b/src/openfermion/utils/_operator_utils_test.py
@@ -38,6 +38,7 @@ class OperatorUtilsTest(unittest.TestCase):
 
     def setUp(self):
         self.n_qubits = 5
+        self.majorana_operator = MajoranaOperator((1, 4, 9))
         self.fermion_term = FermionOperator('1^ 2^ 3 4', -3.17)
         self.fermion_operator = self.fermion_term + hermitian_conjugated(
             self.fermion_term)
@@ -45,6 +46,10 @@ class OperatorUtilsTest(unittest.TestCase):
         self.interaction_operator = get_interaction_operator(
             self.fermion_operator)
 
+    def test_n_qubits_majorana_operator(self):
+        self.assertEqual(self.n_qubits,
+                         count_qubits(self.majorana_operator))
+
     def test_n_qubits_single_fermion_term(self):
         self.assertEqual(self.n_qubits,
                          count_qubits(self.fermion_term))

pip install -e .
parse_log_pytest
requirements.txt
pytest
apt-get update apt-get install -y gcc pip3 install --upgrade pip pip3 install pytest pytest-cov
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
anyio==3.6.2
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
async-generator==1.10
attrs==22.2.0
Babel==2.11.0
backcall==0.2.0
bleach==4.1.0
cached-property==1.5.2
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
comm==0.1.4
contextvars==2.4
coverage==6.2
cycler==0.11.0
dataclasses==0.8
decorator==4.4.2
defusedxml==0.7.1
entrypoints==0.4
future==1.0.0
h5py==3.1.0
idna==3.10
immutables==0.19
importlib-metadata==4.8.3
iniconfig==1.1.1
ipykernel==5.5.6
ipython==7.16.3
ipython-genutils==0.2.0
ipywidgets==7.8.5
jedi==0.17.2
Jinja2==3.0.3
json5==0.9.16
jsonschema==3.2.0
jupyter==1.1.1
jupyter-client==7.1.2
jupyter-console==6.4.3
jupyter-core==4.9.2
jupyter-server==1.13.1
jupyterlab==3.2.9
jupyterlab-pygments==0.1.2
jupyterlab-server==2.10.3
jupyterlab_widgets==1.1.11
kiwisolver==1.3.1
MarkupSafe==2.0.1
matplotlib==3.3.4
mistune==0.8.4
nbclassic==0.3.5
nbclient==0.5.9
nbconvert==6.0.7
nbformat==5.1.3
nest-asyncio==1.6.0
networkx==2.5.1
notebook==6.4.10
numpy==1.19.5
-e git+https://github.com/quantumlib/OpenFermion.git@47f9a60e0113fcec9a3ef889e076f9fa257f8286#egg=openfermion
packaging==21.3
pandocfilters==1.5.1
parso==0.7.1
pexpect==4.9.0
pickleshare==0.7.5
Pillow==8.4.0
pluggy==1.0.0
prometheus-client==0.17.1
prompt-toolkit==3.0.36
ptyprocess==0.7.0
PubChemPy==1.0.4
py==1.11.0
pycparser==2.21
Pygments==2.14.0
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
pytest-cov==4.0.0
python-dateutil==2.9.0.post0
pytz==2025.2
pyzmq==25.1.2
requests==2.27.1
scipy==1.5.4
Send2Trash==1.8.3
six==1.17.0
sniffio==1.2.0
terminado==0.12.1
testpath==0.6.0
tomli==1.2.3
tornado==6.1
traitlets==4.3.3
typing_extensions==4.1.1
urllib3==1.26.20
wcwidth==0.2.13
webencodings==0.5.1
websocket-client==1.3.1
widgetsnbextension==3.6.10
zipp==3.6.0

name: OpenFermion
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - anyio==3.6.2
      - argon2-cffi==21.3.0
      - argon2-cffi-bindings==21.2.0
      - async-generator==1.10
      - attrs==22.2.0
      - babel==2.11.0
      - backcall==0.2.0
      - bleach==4.1.0
      - cached-property==1.5.2
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - comm==0.1.4
      - contextvars==2.4
      - coverage==6.2
      - cycler==0.11.0
      - dataclasses==0.8
      - decorator==4.4.2
      - defusedxml==0.7.1
      - entrypoints==0.4
      - future==1.0.0
      - h5py==3.1.0
      - idna==3.10
      - immutables==0.19
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - ipykernel==5.5.6
      - ipython==7.16.3
      - ipython-genutils==0.2.0
      - ipywidgets==7.8.5
      - jedi==0.17.2
      - jinja2==3.0.3
      - json5==0.9.16
      - jsonschema==3.2.0
      - jupyter==1.1.1
      - jupyter-client==7.1.2
      - jupyter-console==6.4.3
      - jupyter-core==4.9.2
      - jupyter-server==1.13.1
      - jupyterlab==3.2.9
      - jupyterlab-pygments==0.1.2
      - jupyterlab-server==2.10.3
      - jupyterlab-widgets==1.1.11
      - kiwisolver==1.3.1
      - markupsafe==2.0.1
      - matplotlib==3.3.4
      - mistune==0.8.4
      - nbclassic==0.3.5
      - nbclient==0.5.9
      - nbconvert==6.0.7
      - nbformat==5.1.3
      - nest-asyncio==1.6.0
      - networkx==2.5.1
      - notebook==6.4.10
      - numpy==1.19.5
      - packaging==21.3
      - pandocfilters==1.5.1
      - parso==0.7.1
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pillow==8.4.0
      - pip==21.3.1
      - pluggy==1.0.0
      - prometheus-client==0.17.1
      - prompt-toolkit==3.0.36
      - ptyprocess==0.7.0
      - pubchempy==1.0.4
      - py==1.11.0
      - pycparser==2.21
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyzmq==25.1.2
      - requests==2.27.1
      - scipy==1.5.4
      - send2trash==1.8.3
      - six==1.17.0
      - sniffio==1.2.0
      - terminado==0.12.1
      - testpath==0.6.0
      - tomli==1.2.3
      - tornado==6.1
      - traitlets==4.3.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - websocket-client==1.3.1
      - widgetsnbextension==3.6.10
      - zipp==3.6.0
prefix: /opt/conda/envs/OpenFermion

src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_bad_type src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_n_qubits_too_small src/openfermion/transforms/_bravyi_kitaev_test.py::test_bravyi_kitaev_majorana_op_consistent src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_n_qubits_majorana_operator
src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_identity src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_jw_hopping_operator src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_jw_integration src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_jw_integration_original src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_jw_majoranas src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_jw_number_operator src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_jw_number_operator_scaled src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bk_jw_number_operators src/openfermion/transforms/_bravyi_kitaev_test.py::BravyiKitaevTransformTest::test_bravyi_kitaev_transform src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_eigenspectrum src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_is_identity_bad_type src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_is_identity_double_of_unit_bosonoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_is_identity_double_of_unit_fermionoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_is_identity_double_of_unit_qubitoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_is_identity_unit_bosonoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_is_identity_unit_fermionoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_is_identity_unit_quadoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_is_identity_unit_qubitoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_n_qubits_bad_type src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_n_qubits_fermion_operator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_n_qubits_interaction_operator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_n_qubits_qubit_operator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_n_qubits_single_fermion_term src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_not_is_identity_single_term_bosonoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_not_is_identity_single_term_fermionoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_not_is_identity_single_term_quadoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_not_is_identity_single_term_qubitoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_not_is_identity_zero_bosonoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_not_is_identity_zero_quadoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_not_is_identity_zero_qubitoperator src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_reorder src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_reorder_boson src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_reorder_quad src/openfermion/utils/_operator_utils_test.py::OperatorUtilsTest::test_up_then_down src/openfermion/utils/_operator_utils_test.py::ChemistOrderingTest::test_convert_forward_back src/openfermion/utils/_operator_utils_test.py::ChemistOrderingTest::test_exception src/openfermion/utils/_operator_utils_test.py::ChemistOrderingTest::test_form src/openfermion/utils/_operator_utils_test.py::FreezeOrbitalsTest::test_freeze_orbitals_nonvanishing src/openfermion/utils/_operator_utils_test.py::FreezeOrbitalsTest::test_freeze_orbitals_vanishing src/openfermion/utils/_operator_utils_test.py::PruneUnusedIndicesTest::test_prune src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_exceptions src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugate_complex_const src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugate_empty src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugate_notordered src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugate_semihermitian src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugate_simple src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugated_complex_const src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugated_empty src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugated_interaction_operator src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugated_multiterm src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugated_quad_op src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugated_qubit_op src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugated_qubit_op_consistency src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugated_semihermitian src/openfermion/utils/_operator_utils_test.py::HermitianConjugatedTest::test_hermitian_conjugated_simple src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_boson_operator_hermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_boson_operator_identity src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_boson_operator_nonhermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_boson_operator_zero src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_exceptions src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_fermion_operator_hermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_fermion_operator_identity src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_fermion_operator_nonhermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_fermion_operator_zero src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_quad_operator_hermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_quad_operator_identity src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_quad_operator_nonhermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_quad_operator_zero src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_qubit_operator_hermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_qubit_operator_identity src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_qubit_operator_nonhermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_qubit_operator_zero src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_sparse_matrix_and_numpy_array_hermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_sparse_matrix_and_numpy_array_identity src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_sparse_matrix_and_numpy_array_nonhermitian src/openfermion/utils/_operator_utils_test.py::IsHermitianTest::test_sparse_matrix_and_numpy_array_zero src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_basic_save src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_load_bad_type src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_overwrite_flag_save_on_top_of_existing_operator src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_and_load_boson_operators src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_and_load_boson_operators_readably src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_and_load_fermion_operators src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_and_load_fermion_operators_readably src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_and_load_quad_operators src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_and_load_quad_operators_readably src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_and_load_qubit_operators src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_and_load_qubit_operators_readably src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_bad_type src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_interaction_operator_not_implemented src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_no_filename_operator_utils_error src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_on_top_of_existing_operator_error_with_explicit_flag src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_on_top_of_existing_operator_utils_error src/openfermion/utils/_operator_utils_test.py::SaveLoadOperatorTest::test_save_readably src/openfermion/utils/_operator_utils_test.py::FourierTransformTest::test_fourier_transform src/openfermion/utils/_operator_utils_test.py::FourierTransformTest::test_inverse_fourier_transform_1d src/openfermion/utils/_operator_utils_test.py::FourierTransformTest::test_inverse_fourier_transform_2d src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_boson_multi src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_boson_number src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_boson_number_reversed src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_boson_offsite src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_boson_offsite_reversed src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_boson_single_term src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_boson_triple src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_boson_two_term src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_exceptions src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_double_create src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_double_create_separated src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_multi src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_number src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_number_reversed src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_offsite src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_offsite_reversed src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_single_term src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_triple src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_fermion_two_term src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_interaction_operator src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_quad_offsite src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_quad_offsite_reversed src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_quad_single_term src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_quad_triple src/openfermion/utils/_operator_utils_test.py::TestNormalOrdering::test_quad_two_term src/openfermion/utils/_operator_utils_test.py::GroupTensorProductBasisTest::test_boson_operator_bad_type src/openfermion/utils/_operator_utils_test.py::GroupTensorProductBasisTest::test_demo_qubit_operator src/openfermion/utils/_operator_utils_test.py::GroupTensorProductBasisTest::test_empty_qubit_operator src/openfermion/utils/_operator_utils_test.py::GroupTensorProductBasisTest::test_fermion_operator_bad_type src/openfermion/utils/_operator_utils_test.py::GroupTensorProductBasisTest::test_none_bad_type src/openfermion/utils/_operator_utils_test.py::IsContextualTest::test_commuting_hamiltonian src/openfermion/utils/_operator_utils_test.py::IsContextualTest::test_contextual_hamiltonians_with_extra_terms src/openfermion/utils/_operator_utils_test.py::IsContextualTest::test_contextual_two_qubit_hamiltonians src/openfermion/utils/_operator_utils_test.py::IsContextualTest::test_empty_qubit_operator src/openfermion/utils/_operator_utils_test.py::IsContextualTest::test_noncontextual_two_qubit_hamiltonians
src/openfermion/transforms/_bravyi_kitaev.py src/openfermion/utils/_operator_utils.py
src/openfermion/transforms/_bravyi_kitaev.py src/openfermion/utils/_operator_utils.py