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
+
1
10
#pragma once
2
11
3
12
#include " CircuitOptimizer.hpp"
@@ -22,15 +31,19 @@ namespace qc {
22
31
class StatePreparation : public QuantumComputation {
23
32
24
33
public:
25
- explicit StatePreparation (const std::vector<std::complex<double >>& amplitudes);
34
+ explicit StatePreparation (
35
+ const std::vector<std::complex<double >>& amplitudes);
26
36
27
37
private:
28
38
template <typename T> static bool isNormalized (std::vector<T> vec);
29
39
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);
31
43
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);
34
47
static qc::QuantumComputation
35
48
gatesToUncompute (std::vector<std::complex<double >> amplitudes,
36
49
size_t numQubits);
0 commit comments