From ab08fa6065b5b08627b51203eb92ef65ed7b5ea2 Mon Sep 17 00:00:00 2001 From: hachem Date: Sun, 6 Sep 2026 18:53:29 +0200 Subject: c: quantum gate and state foundations --- include/core/quantum_components.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/core/quantum_components.h (limited to 'include/core') 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 + +#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); -- cgit v1.3