Skip to content

Commit

Permalink
add qc solvers
Browse files Browse the repository at this point in the history
  • Loading branch information
ares201005 committed Nov 6, 2024
1 parent 08b85ad commit 100bd00
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 0 deletions.
38 changes: 38 additions & 0 deletions openms/qcsolvers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# @ 2023. Triad National Security, LLC. All rights reserved.
#
# This program was produced under U.S. Government contract 89233218CNA000001
# for Los Alamos National Laboratory (LANL), which is operated by Triad
# National Security, LLC for the U.S. Department of Energy/National Nuclear
# Security Administration. All rights in the program are reserved by Triad
# National Security, LLC, and the U.S. Department of Energy/National Nuclear
# Security Administration. The Government is granted for itself and others acting
# on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this
# material to reproduce, prepare derivative works, distribute copies to the
# public, perform publicly and display publicly, and to permit others to do so.
#
# Author: Yu Zhang <[email protected]>
#

r"""
Quantum solvers: VQE, QKS, QMD, KvN dynamics, and nuclear quantum dynamics
Theoretical Background:
=======================
"""


class QuantumBase(object):
def __init__(self, mf, *args, **kwargs):
"""
mf:
mean-field object for constructing the fermionic Hamiltonain
"""
pass


class GroundState(QuantumBase):
def __init__(self, *args, **kwargs):
pass
38 changes: 38 additions & 0 deletions openms/qcsolvers/clustervqe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# @ 2023. Triad National Security, LLC. All rights reserved.
#
# This program was produced under U.S. Government contract 89233218CNA000001
# for Los Alamos National Laboratory (LANL), which is operated by Triad
# National Security, LLC for the U.S. Department of Energy/National Nuclear
# Security Administration. All rights in the program are reserved by Triad
# National Security, LLC, and the U.S. Department of Energy/National Nuclear
# Security Administration. The Government is granted for itself and others acting
# on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this
# material to reproduce, prepare derivative works, distribute copies to the
# public, perform publicly and display publicly, and to permit others to do so.
#
# Author: Yu Zhang <[email protected]>
#

r"""
PermVQE algorithm
"""

class BaseVQE(object):
def __init__(self, mf, *args, **kwargs):
"""
Base VQE object
mf:
mean-field object for constructing the fermionic Hamiltonain
"""
pass


class ClusterVQE(BaseVQE):

def __init__(self, mf, *args, **kwargs):
r"""
"""
pass


38 changes: 38 additions & 0 deletions openms/qcsolvers/permvqe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#
# @ 2023. Triad National Security, LLC. All rights reserved.
#
# This program was produced under U.S. Government contract 89233218CNA000001
# for Los Alamos National Laboratory (LANL), which is operated by Triad
# National Security, LLC for the U.S. Department of Energy/National Nuclear
# Security Administration. All rights in the program are reserved by Triad
# National Security, LLC, and the U.S. Department of Energy/National Nuclear
# Security Administration. The Government is granted for itself and others acting
# on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this
# material to reproduce, prepare derivative works, distribute copies to the
# public, perform publicly and display publicly, and to permit others to do so.
#
# Author: Yu Zhang <[email protected]>
#

r"""
PermVQE algorithm
"""

class BaseVQE(object):
def __init__(self, mf, *args, **kwargs):
"""
Base VQE object
mf:
mean-field object for constructing the fermionic Hamiltonain
"""
pass


class PermVQE(BaseVQE):

def __init__(self, mf, *args, **kwargs):
r"""
"""
pass


25 changes: 25 additions & 0 deletions openms/qcsolvers/qbackends.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Author: Yu Zhang <[email protected]>
#

"""
Quantum backends:
qiskit/openfermion/...
"""

try:
import qiskit
QISKIT_AVAILABLE = True
except ImportError:
QISKIT_AVAILABLE = False

try:
import openfermion
OPENFERMION_AVAILABLE = True
except ImportError:
OPENFERMION_AVAILABLE = False

# set backend


46 changes: 46 additions & 0 deletions openms/qcsolvers/qks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# @ 2023. Triad National Security, LLC. All rights reserved.
#
# This program was produced under U.S. Government contract 89233218CNA000001
# for Los Alamos National Laboratory (LANL), which is operated by Triad
# National Security, LLC for the U.S. Department of Energy/National Nuclear
# Security Administration. All rights in the program are reserved by Triad
# National Security, LLC, and the U.S. Department of Energy/National Nuclear
# Security Administration. The Government is granted for itself and others acting
# on its behalf a nonexclusive, paid-up, irrevocable worldwide license in this
# material to reproduce, prepare derivative works, distribute copies to the
# public, perform publicly and display publicly, and to permit others to do so.
#
# Author: Yu Zhang <[email protected]>
#

r"""
Quantum Krylov subspace solvers
"""

class BaseQKS(object):
def __init__(self, mf, *args, **kwargs):
"""
Base QKS object
mf:
mean-field object for constructing the fermionic Hamiltonain
"""
pass


class QLanczos(BaseQKS):

def __init__(self, mf, *args, **kwargs):
r"""
"""
pass


class QDavidson(BaseQKS):

def __init__(self, mf, *args, **kwargs):
r"""
"""
pass


0 comments on commit 100bd00

Please sign in to comment.