Skip to content

Commit 971d880

Browse files
🎨 pre-commit fixes
1 parent 84a32fa commit 971d880

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

include/mqt-core/algorithms/StatePreparation.hpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ namespace qc {
2222
* Adapted implementation of IBM Qiskit's State Preparation:
2323
* https://github.com/Qiskit/qiskit/blob/e9ccd3f374fd5424214361d47febacfa5919e1e3/qiskit/circuit/library/data_preparation/state_preparation.py
2424
* based on the following paper:
25-
* V. V. Shende, S. S. Bullock and I. L. Markov, "Synthesis of quantum-logic circuits," in IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 25, no. 6, pp. 1000-1010, June 2006, doi: 10.1109/TCAD.2005.855930.
25+
* V. V. Shende, S. S. Bullock and I. L. Markov, "Synthesis of
26+
*quantum-logic circuits," in IEEE Transactions on Computer-Aided Design of
27+
*Integrated Circuits and Systems, vol. 25, no. 6, pp. 1000-1010, June 2006,
28+
*doi: 10.1109/TCAD.2005.855930.
2629
*
27-
* @param amplitudes state (vector) to prepare. Must be normalized and have a size that is a power of two
30+
* @param amplitudes state (vector) to prepare. Must be normalized and have a
31+
*size that is a power of two
2832
* @return quantum computation that prepares the state
29-
* @throws invalid_argument @p amplitudes is not normalized or its length is not a
30-
* power of two
33+
* @throws invalid_argument @p amplitudes is not normalized or its length is not
34+
*a power of two
3135
**/
3236
[[nodiscard]] auto
3337
createStatePreparationCircuit(std::vector<std::complex<double>>& amplitudes)

src/algorithms/StatePreparation.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ template <typename T>
8181
return identity;
8282
}
8383

84-
[[nodiscard]] auto
85-
matrixVectorProd(const Matrix& matrix,
86-
const std::vector<double>& vector) -> std::vector<double> {
84+
[[nodiscard]] auto matrixVectorProd(const Matrix& matrix,
85+
const std::vector<double>& vector)
86+
-> std::vector<double> {
8787
std::vector<double> result;
8888
for (const auto& matrixVec : matrix) {
8989
double sum{0};

0 commit comments

Comments
 (0)