aboutsummaryrefslogtreecommitdiff
path: root/include/core
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-09-06 18:53:29 +0200
committerhachem <im@hachem.wtf>2026-09-06 18:53:29 +0200
commitab08fa6065b5b08627b51203eb92ef65ed7b5ea2 (patch)
tree09a22fbfcf95a7fd74edeb0dd3af9a6320f66b3a /include/core
parent565af48c1eff190ce836293a0eda75c0dc695c82 (diff)
c: quantum gate and state foundations
Diffstat (limited to 'include/core')
-rw-r--r--include/core/quantum_components.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/core/quantum_components.h b/include/core/quantum_components.h
new file mode 100644
index 0000000..b0acabc
--- /dev/null
+++ b/include/core/quantum_components.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <stddef.h>
+
+#include "maths/matrix.h"
+#include "maths/vector.h"
+
+struct PsiVector psi_new_state_0(void);
+struct PsiVector psi_new_state_1(void);
+
+struct PsiQuantumGate
+{
+ const char *name;
+ struct PsiMatrix matrix;
+ size_t num_qubits;
+};
+
+struct PsiQuantumGate psi_new_quantum_gate(const char *name, struct PsiMatrix matrix, size_t num_qubits);
+struct PsiQuantumGate psi_new_quantum_gate_from_matrix(const char *name, struct PsiMatrix matrix);
+void psi_free_quantum_gate(struct PsiQuantumGate *gate);