Spaces:
Paused
Paused
harishaseebat92
commited on
Commit
·
e5dfd1f
1
Parent(s):
9dd58b1
Quantum Version
Browse files- app.py +1 -4
- em_embedded.py +0 -0
- qlbm/qlbm_sample_app.py +3 -2
- utils/EBU_Quantum/no_body/base_functions.py +2 -2
app.py
CHANGED
|
@@ -27,10 +27,7 @@ state.current_page = None # None = landing, "EM" or "QLBM"
|
|
| 27 |
def _load_logo_data_uri():
|
| 28 |
base_dir = os.path.dirname(__file__)
|
| 29 |
candidates = [
|
| 30 |
-
os.path.join(base_dir, "ansys-part-of-synopsys-logo.svg")
|
| 31 |
-
os.path.join(base_dir, "synopsys-logo-color-rgb.svg"),
|
| 32 |
-
os.path.join(base_dir, "synopsys-logo-color-rgb.png"),
|
| 33 |
-
os.path.join(base_dir, "synopsys-logo-color-rgb.jpg"),
|
| 34 |
]
|
| 35 |
for p in candidates:
|
| 36 |
if os.path.exists(p):
|
|
|
|
| 27 |
def _load_logo_data_uri():
|
| 28 |
base_dir = os.path.dirname(__file__)
|
| 29 |
candidates = [
|
| 30 |
+
os.path.join(base_dir, "ansys-part-of-synopsys-logo.svg")
|
|
|
|
|
|
|
|
|
|
| 31 |
]
|
| 32 |
for p in candidates:
|
| 33 |
if os.path.exists(p):
|
em_embedded.py
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
qlbm/qlbm_sample_app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
from qiskit import QuantumCircuit,QuantumRegister,ClassicalRegister,transpile
|
| 2 |
from qiskit.synthesis.qft import synth_qft_full as QFT
|
| 3 |
import numpy as np
|
|
|
|
| 4 |
|
| 5 |
|
| 6 |
from sympy import sympify, symbols, lambdify
|
|
@@ -573,7 +574,7 @@ def run_sampling_hw_ibm(
|
|
| 573 |
log("Connecting to IBM Quantum service...")
|
| 574 |
update_progress(20, "Connecting to IBM Quantum...")
|
| 575 |
|
| 576 |
-
service = QiskitRuntimeService(channel="ibm_cloud", token="
|
| 577 |
backend = service.least_busy()
|
| 578 |
log(f"Selected backend: {backend.name}")
|
| 579 |
update_progress(25, f"Backend: {backend.name}")
|
|
@@ -696,7 +697,7 @@ def run_sampling_hw_ibm(
|
|
| 696 |
|
| 697 |
from qiskit_ionq import IonQProvider
|
| 698 |
|
| 699 |
-
provider = IonQProvider("
|
| 700 |
|
| 701 |
def run_sampling_hw_ionq(
|
| 702 |
n,
|
|
|
|
| 1 |
from qiskit import QuantumCircuit,QuantumRegister,ClassicalRegister,transpile
|
| 2 |
from qiskit.synthesis.qft import synth_qft_full as QFT
|
| 3 |
import numpy as np
|
| 4 |
+
import os
|
| 5 |
|
| 6 |
|
| 7 |
from sympy import sympify, symbols, lambdify
|
|
|
|
| 574 |
log("Connecting to IBM Quantum service...")
|
| 575 |
update_progress(20, "Connecting to IBM Quantum...")
|
| 576 |
|
| 577 |
+
service = QiskitRuntimeService(channel="ibm_cloud", token=os.environ.get("API_KEY_IBM_QLBM"),instance="crn:v1:bluemix:public:quantum-computing:us-east:a/15157e4350c04a9dab51b8b8a4a93c86:e29afd91-64bf-4a82-8dbf-731e6c213595::")
|
| 578 |
backend = service.least_busy()
|
| 579 |
log(f"Selected backend: {backend.name}")
|
| 580 |
update_progress(25, f"Backend: {backend.name}")
|
|
|
|
| 697 |
|
| 698 |
from qiskit_ionq import IonQProvider
|
| 699 |
|
| 700 |
+
provider = IonQProvider(os.environ.get("API_KEY_IONQ_QLBM"))
|
| 701 |
|
| 702 |
def run_sampling_hw_ionq(
|
| 703 |
n,
|
utils/EBU_Quantum/no_body/base_functions.py
CHANGED
|
@@ -340,7 +340,7 @@ def get_absolute_field_values(all_circuits, shots, pm_optimization_level, simula
|
|
| 340 |
_progress(42, "Connecting to IBM Quantum...")
|
| 341 |
|
| 342 |
service = QiskitRuntimeService(channel="ibm_cloud",
|
| 343 |
-
token="
|
| 344 |
instance="crn:v1:bluemix:public:quantum-computing:us-east:a/15157e4350c04a9dab51b8b8a4a93c86:e29afd91-64bf-4a82-8dbf-731e6c213595::")
|
| 345 |
backend = service.least_busy(operational=True, simulator=False)
|
| 346 |
_log(f"Selected IBM QPU backend: {backend.name}")
|
|
@@ -374,7 +374,7 @@ def get_absolute_field_values(all_circuits, shots, pm_optimization_level, simula
|
|
| 374 |
_log("Connecting to IonQ service...")
|
| 375 |
_progress(42, "Connecting to IonQ...")
|
| 376 |
|
| 377 |
-
provider = IonQProvider(token =
|
| 378 |
ionq_backend = provider.get_backend("qpu.forte-enterprise-1")
|
| 379 |
_log(f"Selected IonQ backend: {ionq_backend.name()}")
|
| 380 |
_progress(45, f"Backend: {ionq_backend.name()}")
|
|
|
|
| 340 |
_progress(42, "Connecting to IBM Quantum...")
|
| 341 |
|
| 342 |
service = QiskitRuntimeService(channel="ibm_cloud",
|
| 343 |
+
token=os.environ.get("API_KEY_IBM_EM"),
|
| 344 |
instance="crn:v1:bluemix:public:quantum-computing:us-east:a/15157e4350c04a9dab51b8b8a4a93c86:e29afd91-64bf-4a82-8dbf-731e6c213595::")
|
| 345 |
backend = service.least_busy(operational=True, simulator=False)
|
| 346 |
_log(f"Selected IBM QPU backend: {backend.name}")
|
|
|
|
| 374 |
_log("Connecting to IonQ service...")
|
| 375 |
_progress(42, "Connecting to IonQ...")
|
| 376 |
|
| 377 |
+
provider = IonQProvider(token = os.environ.get("API_KEY_IONQ_EM"))
|
| 378 |
ionq_backend = provider.get_backend("qpu.forte-enterprise-1")
|
| 379 |
_log(f"Selected IonQ backend: {ionq_backend.name()}")
|
| 380 |
_progress(45, f"Backend: {ionq_backend.name()}")
|