-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into plugin_example
- Loading branch information
Showing
9 changed files
with
1,251 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"cudaq": { | ||
"repository": "NVIDIA/cuda-quantum", | ||
"ref": "5785e44256b757263879580c82cb84adc85bcf5a" | ||
"ref": "1a4f99ef78964a096a09b82fdecc796e10350806" | ||
} | ||
} | ||
|
29 changes: 29 additions & 0 deletions
29
libs/solvers/include/cudaq/solvers/operators/molecule/fermion_compilers/bravyi_kitaev.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 NVIDIA Corporation & Affiliates. * | ||
* All rights reserved. * | ||
* * | ||
* This source code and the accompanying materials are made available under * | ||
* the terms of the Apache License 2.0 which accompanies this distribution. * | ||
******************************************************************************/ | ||
#pragma once | ||
|
||
#include "cudaq/solvers/operators/molecule/fermion_compiler.h" | ||
|
||
namespace cudaq::solvers { | ||
|
||
/// @brief Helper function used by the Bravyi-Kitaev transformation. | ||
cudaq::spin_op seeley_richard_love(std::size_t i, std::size_t j, | ||
std::complex<double> coef, int n_qubits); | ||
|
||
/// @brief Map fermionic operators to spin operators via the | ||
/// Bravyi-Kitaev transformation. | ||
class bravyi_kitaev : public fermion_compiler { | ||
public: | ||
cudaq::spin_op generate(const double constant, const cudaqx::tensor<> &hpq, | ||
const cudaqx::tensor<> &hpqrs, | ||
const cudaqx::heterogeneous_map &options) override; | ||
|
||
CUDAQ_EXTENSION_CREATOR_FUNCTION(fermion_compiler, bravyi_kitaev) | ||
}; | ||
CUDAQ_REGISTER_TYPE(bravyi_kitaev) | ||
} // namespace cudaq::solvers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.