Skip to content

Commit d7e69f4

Browse files
🎨 pre-commit fixes
1 parent d8f3abd commit d7e69f4

File tree

3 files changed

+37
-8
lines changed

3 files changed

+37
-8
lines changed

include/mqt-core/StatePreparation.hpp

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Copyright (c) 2025 Chair for Design Automation, TUM
3+
* All rights reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
6+
*
7+
* Licensed under the MIT License
8+
*/
9+
110
#pragma once
211

312
#include "CircuitOptimizer.hpp"

include/mqt-core/algorithms/StatePreparation.hpp

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Copyright (c) 2025 Chair for Design Automation, TUM
3+
* All rights reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
6+
*
7+
* Licensed under the MIT License
8+
*/
9+
110
#pragma once
211

312
#include "CircuitOptimizer.hpp"
@@ -22,15 +31,19 @@ namespace qc {
2231
class StatePreparation : public QuantumComputation {
2332

2433
public:
25-
explicit StatePreparation(const std::vector<std::complex<double>>& amplitudes);
34+
explicit StatePreparation(
35+
const std::vector<std::complex<double>>& amplitudes);
2636

2737
private:
2838
template <typename T> static bool isNormalized(std::vector<T> vec);
2939
template <typename T> static double twoNorm(std::vector<T> vec);
30-
static std::vector<std::vector<double>> kroneckerProduct(std::vector<std::vector<double>> matrixA, std::vector<std::vector<double>> matrixB);
40+
static std::vector<std::vector<double>>
41+
kroneckerProduct(std::vector<std::vector<double>> matrixA,
42+
std::vector<std::vector<double>> matrixB);
3143
static std::vector<std::vector<double>> createIdentity(size_t size);
32-
static std::vector<double> matrixVectorProd(const std::vector<std::vector<double>>& matrix,
33-
std::vector<double> vector);
44+
static std::vector<double>
45+
matrixVectorProd(const std::vector<std::vector<double>>& matrix,
46+
std::vector<double> vector);
3447
static qc::QuantumComputation
3548
gatesToUncompute(std::vector<std::complex<double>> amplitudes,
3649
size_t numQubits);

src/algorithms/StatePreparation.cpp

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
* Copyright (c) 2025 Chair for Design Automation, TUM
3+
* All rights reserved.
4+
*
5+
* SPDX-License-Identifier: MIT
6+
*
7+
* Licensed under the MIT License
8+
*/
9+
110
#include "algorithms/StatePreparation.hpp"
211

312
static const double EPS = 1e-10;
@@ -6,9 +15,7 @@ namespace qc {
615
using Matrix = std::vector<std::vector<double>>;
716

817
StatePreparation::StatePreparation(
9-
const std::vector<std::complex<double>>& amplitudes) {
10-
11-
}
18+
const std::vector<std::complex<double>>& amplitudes) {}
1219

1320
template <typename T> bool StatePreparation::isNormalized(std::vector<T> vec) {
1421
return std::abs(1 - twoNorm(vec)) < EPS;
@@ -239,4 +246,4 @@ qc::QuantumComputation StatePreparation::multiplex(qc::OpType targetGate,
239246
return multiplexer;
240247
}
241248

242-
} // namespace qc
249+
} // namespace qc

0 commit comments

Comments
 (0)