Skip to content

Commit

Permalink
Merge branch 'main' into feature/fast-pauli-docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
stand-by authored Oct 4, 2024
2 parents 418d6d7 + 613337e commit a4dc8ef
Show file tree
Hide file tree
Showing 48 changed files with 683 additions and 19 deletions.
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# ##############################################################################
# This code is part of Fast Pauli.
#
# (C) Copyright Qognitive Inc 2024.
#
# This code is licensed under the BSD 2-Clause License. You may obtain a copy of
# this license in the LICENSE.txt file in the root directory of this source
# tree.
#
# Any modifications or derivative works of this code must retain this copyright
# notice, and modified files need to carry a notice indicating that they have
# been altered from the originals.
# ##############################################################################

#
# Boilerplate CMakeLists.txt for C++ projects
#
Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#############################################################################
# This code is part of Fast Pauli.
#
# (C) Copyright Qognitive Inc 2024.
#
# This code is licensed under the BSD 2-Clause License. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
#############################################################################


###############################################################################
# BUILD
###############################################################################
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
</tr>
<tr>
<td>Usage</td>
<td>TODO RTD INFO
<td>
<a href='https://qognitive-fast-pauli.readthedocs-hosted.com/en/latest/?badge=latest'>
<img src='https://readthedocs.com/projects/qognitive-fast-pauli/badge/?version=latest' alt='Documentation Status' />
</a>
<a href="https://github.com/qognitive/fast-pauli/tree/develop?tab=readme-ov-file#installation"><img src="https://img.shields.io/badge/Docs-Installation-blue" alt="Installation"></a>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ based on `PauliComposer <https://arxiv.org/abs/2301.00560>`_. In this guide,
we'll introduce some of the important operations to help users get started. For more details,
see the API documentation.

For tips on installing the library, check out the guide: :doc:`install`.
For tips on installing the library, check out the guide: :doc:`index`.

Pauli Matrices
------------------------
Expand Down
45 changes: 41 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,53 @@ fast_pauli documentation
:maxdepth: 1
:caption: Contents

install
examples
getting_started
benchmarks
python_api
cpp_api


Introduction
Installation
============
Welcome to ``fast_pauli``! This package provides fast and efficient implementations of pauli operators and strings,
with a focus on performance and usability. In order to get started, we'll need to install the package and its dependencies.

Our Goals
=========
Here are a few options for installing ``fast_pauli``:

Install using ``pip``
------------------
.. code-block:: bash
pip install fast_pauli
Install from source with Python
-------------------------------
.. code-block:: bash
git clone [email protected]:qognitive/fast-pauli.git
cd fast_pauli
python -m pip install -e ".[dev]"
Build From Source with CMake
----------------------------
.. code-block:: bash
git clone [email protected]:qognitive/fast-pauli.git
cd fast-pauli
# Configure/Compile the project
cmake -B build -G Ninja # <...custom cmake flags...>
cmake --build build --target install --parallel
ctest --test-dir build
# Install the python package
python -m pip install -e ".[dev]" --no-build-isolation
Verify / Test Build
-------------------

.. code-block:: bash
pytest -v tests/fast_pauli # + other pytest flags
13 changes: 0 additions & 13 deletions docs/install.rst

This file was deleted.

15 changes: 15 additions & 0 deletions fast_pauli/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#############################################################################
# This code is part of Fast Pauli.
#
# (C) Copyright Qognitive Inc 2024.
#
# This code is licensed under the BSD 2-Clause License. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
#############################################################################


""":code:`fast_pauli` is a Python package with C++ backend, optimized for operations on Pauli Matrices and Pauli Strings.""" # noqa: E501

from ._fast_pauli import ( # noqa: F401
Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/examples/01_pauli_op.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#include <algorithm>
#include <random>

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/examples/02_pauli_op_multistate.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#include <algorithm>
#include <experimental/mdspan>
#include <random>
Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/examples/03_summed_pauli_op.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#include <algorithm>
#include <experimental/mdspan>
#include <random>
Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# ##############################################################################
# This code is part of Fast Pauli.
#
# (C) Copyright Qognitive Inc 2024.
#
# This code is licensed under the BSD 2-Clause License. You may obtain a copy of
# this license in the LICENSE.txt file in the root directory of this source
# tree.
#
# Any modifications or derivative works of this code must retain this copyright
# notice, and modified files need to carry a notice indicating that they have
# been altered from the originals.
# ##############################################################################

# Grab all *.cpp files in the directory
file(GLOB EXAMPLE CONFIGURE_DEPENDS "*.cpp")

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/include/__factory.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#ifndef __FAST_PAULI_FACTORY_HPP
#define __FAST_PAULI_FACTORY_HPP

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/include/__nb_helpers.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#ifndef __NB_HELPERS_HPP
#define __NB_HELPERS_HPP

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/include/__pauli.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#ifndef __PAULI_HPP
#define __PAULI_HPP

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/include/__pauli_helpers.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#ifndef __PAULI_HELPERS_HPP
#define __PAULI_HELPERS_HPP

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/include/__pauli_op.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#ifndef __PAULI_OP_HPP
#define __PAULI_OP_HPP

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/include/__pauli_string.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#ifndef __PAULI_STRING_HPP
#define __PAULI_STRING_HPP

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/include/__summed_pauli_op.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#ifndef __SUMMED_PAULI_OP_HPP
#define __SUMMED_PAULI_OP_HPP

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/include/__type_traits.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#ifndef __FP_TYPE_TRAITS_HPP
#define __FP_TYPE_TRAITS_HPP

Expand Down
14 changes: 14 additions & 0 deletions fast_pauli/cpp/include/fast_pauli.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
/**
* This code is part of Fast Pauli.
*
* (C) Copyright Qognitive Inc 2024.
*
* This code is licensed under the BSD 2-Clause License. You may
* obtain a copy of this license in the LICENSE.txt file in the root directory
* of this source tree.
*
* Any modifications or derivative works of this code must retain this
* copyright notice, and modified files need to carry a notice indicating
* that they have been altered from the originals.
*/

#ifndef FAST_PAULI_HPP
#define FAST_PAULI_HPP

Expand Down
Loading

0 comments on commit a4dc8ef

Please sign in to comment.