diff options
| author | hachem <im@hachem.wtf> | 2026-09-06 21:06:02 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-06 21:06:02 +0200 |
| commit | baecb524fb2b8162409d86d84cdddbd20b930c50 (patch) | |
| tree | 88cbc334f2ce2c3b975d97c5ca584ad5beab0b29 /include/core | |
| parent | 081fc18575be18ddedf603638793152d5ddc83b6 (diff) | |
add: classical bits and registers
Diffstat (limited to 'include/core')
| -rw-r--r-- | include/core/classical_components.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/core/classical_components.h b/include/core/classical_components.h new file mode 100644 index 0000000..48714b4 --- /dev/null +++ b/include/core/classical_components.h @@ -0,0 +1,21 @@ +#pragma once + +#include <stdbool.h> +#include <stddef.h> + +struct PsiClassicalBit +{ + const char *name; + bool state; +}; + +struct PsiClassicalRegister +{ + const char *name; + struct PsiClassicalBit *bits; + size_t num_bits; +}; + +struct PsiClassicalBit psi_new_classical_bit(const char *name, bool state); +struct PsiClassicalRegister psi_new_classical_register(const char *name, const char **names, size_t count); +void psi_free_classical_register(struct PsiClassicalRegister *reg); |
