Ivankilin commited on
Commit
0e01a2a
·
verified ·
1 Parent(s): 0f730c7

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -31
app.py DELETED
@@ -1,31 +0,0 @@
1
- import gradio as gr
2
- from qiskit import QuantumCircuit
3
- from qiskit_aer import AerSimulator
4
- from goldbach_core import run_quantum
5
- import matplotlib.pyplot as plt
6
-
7
- def goldbach_interface(N):
8
- N = int(N)
9
- if N % 2 != 0 or N < 4:
10
- return "Введите чётное N ≥ 4"
11
- res = run_quantum(N)
12
- if res:
13
- p, q = res
14
- fig, ax = plt.subplots()
15
- ax.bar([f"{p}+{q}"], [1], color='teal')
16
- ax.set_title(f"{N} = {p} + {q}")
17
- ax.set_ylabel("Сигнал")
18
- return fig
19
- else:
20
- return "Пара не найдена (маловероятно для N ≤ 1000)"
21
-
22
- demo = gr.Interface(
23
- fn=goldbach_interface,
24
- inputs=gr.Number(label="Чётное N", value=30),
25
- outputs=gr.Plot(),
26
- title="Q-GoH: Quantum Goldbach Hypothesis",
27
- description="Квантовый поиск пары (p,q) такой, что p+q=N."
28
- )
29
-
30
- if __name__ == "__main__":
31
- demo.launch(server_name="0.0.0.0", server_port=7860)