diff options
| author | hachem <im@hachem.wtf> | 2026-09-18 12:25:32 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-09-18 12:25:32 +0200 |
| commit | 17598056a69a14e0390a07251d383f413ded9eea (patch) | |
| tree | 79cf23ea99072f065407da3e0b92ee03f8972695 /include/core/custom_gate.h | |
| parent | ee14ad272e68d9363202d7f668e0b20302827209 (diff) | |
feat: add matrix, vector, and circuit display + fmt
Diffstat (limited to 'include/core/custom_gate.h')
| -rw-r--r-- | include/core/custom_gate.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/include/core/custom_gate.h b/include/core/custom_gate.h index efda36f..7003699 100644 --- a/include/core/custom_gate.h +++ b/include/core/custom_gate.h @@ -7,46 +7,46 @@ enum PsiCompositeOp { - PSI_OP_H, - PSI_OP_X, - PSI_OP_Y, - PSI_OP_Z, - PSI_OP_S, - PSI_OP_T, - PSI_OP_CNOT, - PSI_OP_CZ, - PSI_OP_SWAP, - PSI_OP_CCNOT, - PSI_OP_CSWAP, + PSI_OP_H, + PSI_OP_X, + PSI_OP_Y, + PSI_OP_Z, + PSI_OP_S, + PSI_OP_T, + PSI_OP_CNOT, + PSI_OP_CZ, + PSI_OP_SWAP, + PSI_OP_CCNOT, + PSI_OP_CSWAP, }; struct PsiCompositeGateOp { - enum PsiCompositeOp op; - size_t targets[3]; - size_t target_count; + enum PsiCompositeOp op; + size_t targets[3]; + size_t target_count; }; enum PsiCustomGateKind { - PSI_CUSTOM_GATE_MATRIX, - PSI_CUSTOM_GATE_COMPOSITE, + PSI_CUSTOM_GATE_MATRIX, + PSI_CUSTOM_GATE_COMPOSITE, }; struct PsiCustomGate { - const char* name; - size_t num_qubits; - enum PsiCustomGateKind kind; - union - { - struct PsiMatrix matrix; - struct - { - struct PsiCompositeGateOp* ops; - size_t count; - } composite; - } definition; + const char* name; + size_t num_qubits; + enum PsiCustomGateKind kind; + union + { + struct PsiMatrix matrix; + struct + { + struct PsiCompositeGateOp* ops; + size_t count; + } composite; + } definition; }; struct PsiCustomGate psi_new_custom_gate_from_matrix(const char* name, struct PsiMatrix matrix); |
