Skip to content

Commit

Permalink
Add module level description.
Browse files Browse the repository at this point in the history
  • Loading branch information
fdmalone committed Jun 25, 2024
1 parent 595a0b7 commit e342b8b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
1 change: 0 additions & 1 deletion recirq/qcqmc/afqmc_circuits.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# 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.

"""Trial wavefunction circuit ansatz primitives."""

import itertools
Expand Down
10 changes: 10 additions & 0 deletions recirq/qcqmc/afqmc_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
# 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.
r"""Module for building generators for various fermionic wavefunction ansatzes for AFQMC.
Given a unitary defined in terms of fermionic modes of the form
$$
U = e^{\alpha a_p^\dagger a_q}
$$
the generator of this unitary (gate) is $a_p^\dagger a_q$ where $a_p^{(\dagger)}
$ is the fermionic annihilation (creation) operator for a fermion in spin
orbital $p$.
"""

from typing import List, Sequence, Tuple

Expand Down
2 changes: 2 additions & 0 deletions recirq/qcqmc/fermion_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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.
"""Specification of a fermion mode."""
import attrs


Expand All @@ -21,6 +22,7 @@ class FermionicMode:
Args:
orb_ind: The spatial orbital index.
spin: The spin state of the fermion mode (up or down (alpha or beta)).
Must be either 'a' or 'b'.
"""

orb_ind: int
Expand Down
1 change: 1 addition & 0 deletions recirq/qcqmc/layer_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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.
"""Specification of hardware efficient layers and utility functions for indexing."""

from typing import Iterator, List, Tuple

Expand Down
13 changes: 3 additions & 10 deletions recirq/qcqmc/optimize_wf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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.
"""Functions for the variational optimizion of a trial wavefunction."""

import copy
import itertools
Expand All @@ -26,16 +27,8 @@
import scipy.optimize
import scipy.sparse

from recirq.qcqmc import (
afqmc_circuits,
afqmc_generators,
converters,
data,
fermion_mode,
hamiltonian,
layer_spec,
trial_wf,
)
from recirq.qcqmc import (afqmc_circuits, afqmc_generators, converters, data,
fermion_mode, hamiltonian, layer_spec, trial_wf)


def get_and_check_energy(
Expand Down
1 change: 1 addition & 0 deletions recirq/qcqmc/qubit_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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.
"""Various mappings between fermions and qubits."""
from typing import Dict, Tuple

import cirq
Expand Down
1 change: 1 addition & 0 deletions recirq/qcqmc/trial_wf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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.
"""Specification of a trial wavefunction."""

import abc
from typing import Dict, Iterable, Optional, Sequence, Tuple
Expand Down

0 comments on commit e342b8b

Please sign in to comment.