Skip to content
Open
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 .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ allowed-redefined-builtins=
callbacks=cb_,
_cb

# A regular expression matching the name of dummy variables (i.e. expected to
# A regular expression matching the name of placeholder variables (i.e. expected to
# not be used).
dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_

Expand Down
2 changes: 1 addition & 1 deletion dev_tools/requirements/create-env-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cd "${repo_dir}"

mkdir -p dev_tools/requirements/envs dev_tools/requirements/max_compat

# ~~~~ Generate normal requirements files ~~~~
# ~~~~ Generate basic requirements files ~~~~

uv pip compile "$@" \
-o dev_tools/requirements/envs/dev.env.txt \
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/binary_code_transforms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
"## Symbolic binary functions\n",
"\n",
"The non-linear binary functions for the components of the decoder are here modeled by the $\\text{BinaryPolynomial}$ class in openfermion.ops.\n",
"For initialization we can conveniently use strings ('w0 w1 + w1 +1' for the binary function $\\boldsymbol{\\omega} \\to \\omega_0 \\omega_1 + \\omega_1 + 1 \\;\\text{mod 2}$), the native data structure or symbolic addition and multiplication."
"For initialization we can conveniently use strings ('w0 w1 + w1 +1' for the binary function $\\boldsymbol{\\omega} \\to \\omega_0 \\omega_1 + \\omega_1 + 1 \\;\\text{mod 2}$), the built-in data structure or symbolic addition and multiplication."
]
},
{
Expand All @@ -134,7 +134,7 @@
"print(BinaryPolynomial('w0') * BinaryPolynomial('w1 + 1') + BinaryPolynomial('1'))\n",
"print(BinaryPolynomial([(1, 0), (1, ), ('one', )]))\n",
"\n",
"print('The native data type structure can be seen here:')\n",
"print('The built-in data type structure can be seen here:')\n",
"print(binary_1.terms)\n",
"print('We can always evaluate the expression for instance by the vector (w0, w1, w2) = (1, 0, 0):',\n",
" binary_1.evaluate('100'))"
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/circuits_1_basis_change.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
"id": "e524a8c4bf7b"
},
"source": [
"Thus, we see that the circuit correctly effects the intended evolution. We can now use Cirq's compiler to output the circuit using gates native to near-term devices, and then optimize those circuits. We'll output in QASM 2.0 just to demonstrate that functionality."
"Thus, we see that the circuit correctly effects the intended evolution. We can now use Cirq's compiler to output the circuit using gates built-in to near-term devices, and then optimize those circuits. We'll output in QASM 2.0 just to demonstrate that functionality."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion rtd_docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#
source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'}

# The master toctree document.
# The main toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down
8 changes: 4 additions & 4 deletions src/openfermion/chem/molecular_data_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ def test_save_load(self):
self.assertEqual(self.molecule.n_atoms, n_atoms + 1)
self.molecule.load()
self.assertEqual(self.molecule.n_atoms, n_atoms)
dummy_data = self.molecule.get_from_file("dummy_entry")
self.assertTrue(dummy_data is None)
placeholder_data = self.molecule.get_from_file("placeholder_entry")
self.assertTrue(placeholder_data is None)

def test_dummy_save(self):
def test_placeholder_save(self):
# Make fake molecule.
filename = os.path.join(self.test_dir, 'dummy_molecule')
filename = os.path.join(self.test_dir, 'placeholder_molecule')
geometry = [('H', (0.0, 0.0, 0.0)), ('H', (0.0, 0.0, 0.7414))]
basis = '6-31g*'
multiplicity = 7
Expand Down
2 changes: 1 addition & 1 deletion src/openfermion/circuits/primitives/swap_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def swap_network(
representing either qubits or fermionic modes, and p_qubit and
q_qubit are the qubits which are currently storing those modes.
fermionic: If True, use fermionic swaps under the JWT (that is, swap
fermionic modes instead of qubits). If False, use normal qubit
fermionic modes instead of qubits). If False, use ordinary qubit
swaps.
offset: If True, then qubit 0 will participate in odd-numbered layers
instead of even-numbered layers.
Expand Down
4 changes: 2 additions & 2 deletions src/openfermion/measurements/fermion_partitioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ def pair_within_simultaneously(labels: list[T]) -> Generator[Pairing[T], None, N

for partition in _gen_partitions(labels):
generator_list = [_loop_iterator(pair_within, partition[j]) for j in range(len(partition))]
for dummy1 in range(len(partition[-2]) - 1 + len(partition[-2]) % 2):
for _unused1 in range(len(partition[-2]) - 1 + len(partition[-2]) % 2):
pairing: Pairing[T] = ()
for generator in generator_list[::2]:
pairing = pairing + next(generator)[0]
for dummy2 in range(len(partition[-1]) - 1 + len(partition[-1]) % 2):
for _unused2 in range(len(partition[-1]) - 1 + len(partition[-1]) % 2):
pairing2 = tuple(pairing)
for generator in generator_list[1::2]:
pairing2 = pairing2 + next(generator)[0]
Expand Down
2 changes: 1 addition & 1 deletion src/openfermion/ops/operators/binary_polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class BinaryPolynomial:

For initialization, the preferred data types is either a string of the
multinomial, where each variable and constant is to be well separated by
a whitespace, or in its native form of tuples,
a whitespace, or in its built-in form of tuples,
1 + w1 w2 + w0 w1 is represented as [(_SYMBOLIC_ONE,),(1,2),(0,1)]

After initialization,BinaryPolynomial terms can be manipulated with the
Expand Down
Loading
Loading