Skip to content

Commit

Permalink
Merge branch 'ScQ-Cloud:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
chensgit169 committed Sep 2, 2023
2 parents 7122ee0 + ccd8ee9 commit a96f804
Show file tree
Hide file tree
Showing 76 changed files with 44 additions and 10 deletions.
File renamed without changes.
3 changes: 3 additions & 0 deletions quafu/algorithms/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
"""Algorithm module"""

from .hamiltonian import Hamiltonian
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions quafu/algorithms/hamiltonian.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# (C) Copyright 2023 Beijing Academy of Quantum Information Sciences
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

"""Quafu Hamiltonian class"""

from __future__ import annotations

from collections.abc import Iterable


class Hamiltonian:
"""TODO"""

def __init__(self) -> None:
pass

@staticmethod
def from_pauli_list(pauli: Iterable[tuple[str, complex]]) -> Hamiltonian:
"""
Args:
pauli: The supported format of pauli list is [(<pauli-str>, <coefficient>)],
e.g., [('IIIZZ', 1), ("IIZIZ", 1), ...)], 0th qubit is farthest right
"""
return Hamiltonian()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@
url="https://github.com/ScQ-Cloud/pyquafu",
description="Python toolkit for Quafu-Cloud",
install_requires=requirements,
packages=find_packages(where="src"),
package_dir={"": "src"},
cmake_install_dir="src/quafu/simulators/",
packages=find_packages(exclude=["test*"]),
cmake_install_dir="quafu/simulators/",
include_package_data=True,
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
1 change: 0 additions & 1 deletion src/quafu/algorithms/__init__.py

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Quafu Hamiltonian class"""
from quafu.algorithms.hamiltonian import Hamiltonian

class TestHamiltonian:

class Hamiltonian:
"""TODO"""

def __init__(self) -> None:
pass
def test_init(self):
h = Hamiltonian()

0 comments on commit a96f804

Please sign in to comment.