repo stringclasses 900
values | file stringclasses 754
values | content stringlengths 4 215k |
|---|---|---|
https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider | Alice-Bob-SW | '''
qiskitpool/job.py
Contains the QJob class
'''
from functools import partial
from qiskit import execute
class QJob():
'''
QJob
Job manager for asynch qiskit backends
'''
def __init__(self, *args, qjob_id=None, **kwargs):
'''
QJob.__init__
... |
https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider | Alice-Bob-SW | ##############################################################################
# Copyright 2023 Alice & Bob
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://w... |
https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider | Alice-Bob-SW | import pytest
from qiskit import QuantumCircuit
from qiskit.transpiler import PassManager
from qiskit_alice_bob_provider.local.quantum_errors import (
build_quantum_error_passes,
)
from qiskit_alice_bob_provider.processor.description import (
ProcessorDescription,
)
from .processor_fixture import (... |
https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider | Alice-Bob-SW | import pytest
from qiskit import QuantumCircuit, execute
from qiskit_alice_bob_provider.local.backend import ProcessorSimulator
from qiskit_alice_bob_provider.local.readout_errors import (
build_readout_noise_model,
)
from qiskit_alice_bob_provider.processor.description import (
ProcessorDescription,
... |
https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider | Alice-Bob-SW | from typing import Iterator, Tuple
import pytest
from qiskit import QuantumCircuit, transpile
from qiskit.extensions.quantum_initializer import Initialize
from qiskit_alice_bob_provider.local.backend import ProcessorSimulator
from qiskit_alice_bob_provider.processor.description import (
ProcessorDescripti... |
https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider | Alice-Bob-SW | from typing import Iterator, List, Set, Tuple
import numpy as np
import pytest
from qiskit import QuantumCircuit, execute
from qiskit_aer.backends import AerSimulator
from qiskit_aer.noise import NoiseModel, pauli_error
from qiskit_alice_bob_provider.local.backend import ProcessorSimulator
from qiskit_alice_... |
https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider | Alice-Bob-SW | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or deriv... |
https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider | Alice-Bob-SW | ##############################################################################
# Copyright 2023 Alice & Bob
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://w... |
https://github.com/Alice-Bob-SW/qiskit-alice-bob-provider | Alice-Bob-SW | ##############################################################################
# Copyright 2023 Alice & Bob
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://w... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | from qiskit import *
import torch
from torch.autograd import Function
class myExp(Function):
@staticmethod
def forward(ctx, i):
result = i.exp()
ctx.save_for_backward(result)
return result
@staticmethod
def backward(ctx, grad_output):
result, = ct... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/BoschSamuel/QizGloria | BoschSamuel | # -- coding: utf-8 --
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | import qiskit
from qiskit import IBMQ # requires qiskit version >= 0.6
IBMQ.save_account("MY_TOKEN")
IBMQ.load_accounts()
for backend in IBMQ.backends():
print(backend)
backend_0 = IBMQ.backends()[0] # retrieve the Backend at index 0
print(backend_0.configuration())
print("Go check its specifica... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from qiskit import ClassicalRegister
# Create a Classical Register with 2 bits.
c = ClassicalRegister(2)
from qiskit import QuantumRegister
# Create a Quantum Register with 2 qubits.
q = QuantumRegister(2)
from qiskit import QuantumCircuit
# Create a Quantum Circuit
qc = QuantumCircuit(q, c)
# perform a me... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute
# Choose the drawer you like best:
from qiskit.tools.visualization import matplotlib_circuit_drawer as draw
#from qiskit.tools.visualization import circuit_drawer as draw
from qiskit import IBMQ
IBMQ.load_accounts... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute
# Choose the drawer you like best:
from qiskit.tools.visualization import matplotlib_circuit_drawer as draw
#from qiskit.tools.visualization import circuit_drawer as draw
from qiskit import IBMQ
IBMQ.load_accounts... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute
# Choose the drawer you like best:
from qiskit.tools.visualization import matplotlib_circuit_drawer as draw
#from qiskit.tools.visualization import circuit_drawer as draw
from qiskit import IBMQ
IBMQ.load_accounts... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute
# Choose the drawer you like best:
from qiskit.tools.visualization import matplotlib_circuit_drawer as draw
#from qiskit.tools.visualization import circuit_drawer as draw
from qiskit import IBMQ
IBMQ.load_accounts... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute
# Choose the drawer you like best:
from qiskit.tools.visualization import matplotlib_circuit_drawer as draw
#from qiskit.tools.visualization import circuit_drawer as draw
from qiskit import IBMQ
IBMQ.load_accounts... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute
# Choose the drawer you like best:
from qiskit.tools.visualization import matplotlib_circuit_drawer as draw
#from qiskit.tools.visualization import circuit_drawer as draw
from qiskit import IBMQ
IBMQ.load_accounts... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
# importing Qiskit
from qiskit import Aer, IBMQ
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import available_backends, execute, register, get_backend, compile
from qiskit.tools import visualization
fr... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | import math
# importing Qiskit
from qiskit import Aer, IBMQ
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit, execute
from qiskit.backends.ibmq import least_busy
# useful additional packages
from qiskit.wrapper.jupyter import *
from qiskit.tools.visualization import plot_histogram
IB... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from IPython.display import HTML
HTML('<div align="center"><iframe width="560" height="315" align="centre" src="https://www.youtube.com/embed/hOlOY7NyMfs?start=75&end=126" frameborder="0" allowfullscreen></iframe></div>')
# Brute force period finding algorithm
def find_period_classical(x, N):
n = 1
t = ... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | import pylab
from qiskit_aqua import run_algorithm
from qiskit_aqua.input import get_input_instance
from qiskit.tools.visualization import matplotlib_circuit_drawer as draw
from qiskit.tools.visualization import plot_histogram
with open('3sat3-5.cnf', 'r') as f:
sat_cnf = f.read()
print(sat_cnf)
algorit... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from qsvm_datasets import *
from qiskit_aqua.utils import split_dataset_to_data_and_labels, map_label_to_class_name
from qiskit_aqua.input import get_input_instance
from qiskit_aqua import run_algorithm
# setup aqua logging
import logging
from qiskit_aqua._logging import set_logging_config, build_logging_config... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | # useful additional packages
import matplotlib.pyplot as plt
import matplotlib.axes as axes
%matplotlib inline
import numpy as np
import networkx as nx
from qiskit.tools.visualization import plot_histogram
from qiskit_aqua import Operator, run_algorithm, get_algorithm_instance
from qiskit_aqua.input import g... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | # useful additional packages
import matplotlib.pyplot as plt
import matplotlib.axes as axes
%matplotlib inline
import numpy as np
import networkx as nx
from qiskit.tools.visualization import plot_histogram
from qiskit_aqua import Operator, run_algorithm, get_algorithm_instance
from qiskit_aqua.input import g... |
https://github.com/msramalho/Teach-Me-Quantum | msramalho | from qiskit_aqua_chemistry import AquaChemistry
from qiskit import IBMQ
IBMQ.load_accounts()
# Input dictionary to configure Qiskit AQUA Chemistry for the chemistry problem.
aqua_chemistry_dict = {
'driver': {'name': 'HDF5'},
'HDF5': {'hdf5_input': '0.7_sto-3g.hdf5'},
'operator': {'name': 'hamilt... |
https://github.com/rochisha0/quantum-ugly-duckling | rochisha0 | import numpy as np
from qiskit import execute, QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit.providers.aer import QasmSimulator
# Import from Qiskit Aer noise module
from qiskit.providers.aer.noise import NoiseModel
from qiskit.providers.aer.noise import QuantumError, ReadoutError
from qiskit.p... |
https://github.com/rochisha0/quantum-ugly-duckling | rochisha0 | #importing libraries
from qiskit import QuantumCircuit, QuantumRegister, Aer, execute, IBMQ
from qiskit.visualization import plot_histogram
from qiskit.tools.monitor import job_monitor
provider = IBMQ.load_account()
backend = provider.backends.ibmqx2
real_circ = QuantumCircuit(3, 3)
for i in range(200):
... |
https://github.com/rochisha0/quantum-ugly-duckling | rochisha0 | from qiskit.tools.jupyter import *
from qiskit import IBMQ
IBMQ.save_account('IBMQ ID', overwrite=True)
IBMQ.load_account()
provider = IBMQ.get_provider(hub='ibm-q', group='open', project='main')
backend = provider.get_backend('ibmq_armonk')
backend_config = backend.configuration()
assert backend_config.... |
https://github.com/rochisha0/quantum-ugly-duckling | rochisha0 | import math
import statistics
import matplotlib.pyplot as plt
import numpy as np
from qiskit import execute, QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit.providers.aer import QasmSimulator
# Import from Qiskit Aer noise module
from qiskit.providers.aer.noise import NoiseModel
from qiskit.p... |
https://github.com/GroenteLepel/qiskit-quantum-knn | GroenteLepel | from qiskit_quantum_knn.qknn import QKNeighborsClassifier
from qiskit_quantum_knn.encoding import analog
from qiskit.utils import QuantumInstance
from sklearn import datasets
import qiskit as qk
# initialising the quantum instance
backend = qk.BasicAer.get_backend('qasm_simulator')
instance = QuantumInstance(b... |
https://github.com/GroenteLepel/qiskit-quantum-knn | GroenteLepel | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from qiskit_quantum_knn.qknn import QKNeighborsClassifier
from qiskit_quantum_knn.encoding import analog
from sklearn import datasets
import qiskit as qk
from qiskit.utils import QuantumInstance
# initialising the quantum instance
backend = qk.BasicAer.get_b... |
https://github.com/GroenteLepel/qiskit-quantum-knn | GroenteLepel | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
#... |
https://github.com/GroenteLepel/qiskit-quantum-knn | GroenteLepel | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
#... |
https://github.com/GroenteLepel/qiskit-quantum-knn | GroenteLepel | """The quantum KNN algorithm."""
from typing import Dict, Optional, Union
import logging
import itertools
import numpy as np
import scipy.stats as stats
import qiskit as qk
import qiskit.result as qres
import qiskit.tools as qktools
from qiskit.utils import QuantumInstance
import qiskit.providers as qkp... |
https://github.com/GroenteLepel/qiskit-quantum-knn | GroenteLepel | """Construction of a QkNN QuantumCircuit."""
import logging, warnings
from typing import List, Union
import numpy as np
import qiskit as qk
import qiskit.extensions.quantum_initializer as qi
import qiskit.circuit as qcirc
import qiskit.circuit.instruction as qinst
import qiskit_quantum_knn.qknn.quantumgat... |
https://github.com/GroenteLepel/qiskit-quantum-knn | GroenteLepel | from typing import Optional
import numpy as np
import qiskit as qk
import qiskit.extensions.quantum_initializer as qi
from qiskit.circuit.controlledgate import ControlledGate
from qiskit.circuit.gate import Gate
"""
Extra file containing some decomposed quantum gates to get familiar with them
and Qiskit.
... |
https://github.com/GroenteLepel/qiskit-quantum-knn | GroenteLepel | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
#... |
https://github.com/GroenteLepel/qiskit-quantum-knn | GroenteLepel | import numpy as np
import qiskit as qk
from qiskit.utils import QuantumInstance
import pytest
from qiskit_quantum_knn.qknn import QKNeighborsClassifier
def test_get_all_contrasts():
assert True
def test_calculate_fidelities():
ex_counts = {
'00 0': 10,
'00 1': 1,
'01... |
https://github.com/amyami187/QiskitML | amyami187 | import numpy as np
import torch
from torch.autograd import Function
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from torchvision import datasets, transforms
from qiskit import QuantumRegister, QuantumCircuit, ClassicalRegister, execute
from qiskit.circui... |
https://github.com/pyRiemann/pyRiemann-qiskit | pyRiemann | import logging
import numpy as np
from qiskit import ClassicalRegister, QuantumRegister, QuantumCircuit
from qiskit.circuit.library import RealAmplitudes
from qiskit.quantum_info import Statevector
from qiskit_algorithms.optimizers import SPSA
from qiskit_algorithms.utils import algorithm_globals
from qiskit_m... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
import os
RUNTIME_PROGRAM_METADATA = {
"max_execution_time": 600,
"description": "Qiskit test program"
}
# PROGRAM_PREFIX = 'qiskit-test'
def main():
provider = DellRuntimeProvider()
here = os.path.dirname(os.... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or deriv... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | import itertools
import json
import numpy as np
from numpy.random import RandomState
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.compiler import transpile
from cvxopt import matrix, solvers # pylint: disable=import-error
from .qka import QKA
class FeatureMap:
def __init__(self, feat... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | import itertools
import json
import numpy as np
from numpy.random import RandomState
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.compiler import transpile
from cvxopt import matrix, solvers # pylint: disable=import-error
|
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | import itertools
import json
import numpy as np
from numpy.random import RandomState
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.compiler import transpile
from cvxopt import matrix, solvers # pylint: disable=import-error
class QKA:
def __init__(self, feature_map, backend, initial_layou... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
import logging
import requests
import time
import os
RUNTIME_PROGRAM = """
# This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a c... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
provider = DellRuntimeProvider()
provider.remote({server IP/URL})
program_id = provider.runtime.upload_program( \
(required) {data}, \
(optional) metadata={metadata}, ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from dell_runtime import BackendProvider
provider = BackendProvider()
provider.backends()
backend = provider.get_backend(name="emulator")
backend_config = backend.configuration()
backend_config.backend_name
from qiskit import QuantumCircuit, execute
qc = ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
RUNTIME_PROGRAM = """
import random
from qiskit import transpile
from qiskit.circuit.random import random_circuit
def prepare_circuits(backend):
circuit = random_circuit(num_qubits=5, depth=4, measure=True,
seed=random.randint(0, ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from dell_runtime import BackendProvider
from qiskit import QuantumCircuit
provider = DellRuntimeProvider()
RUNTIME_PROGRAM = """
# This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | !pip install pandas
from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
import pandas as pd
import os
from time import sleep
df = pd.read_csv('./aux_file/dataset_graph7.csv',sep=',', header=None) # alterative problem: dataset_graph10.csv
data = df.values
provider = DellRuntimeProvid... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
import os
provider = DellRuntimeProvider()
provider.remote(os.getenv("SERVER_URL"))
provider.runtime.programs()
provider.runtime.pprint_programs()
RUNTIME_PROGRAM = """
from qiskit.compiler import transpile, schedule
def main(
backend,
user_me... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from qiskit import QuantumCircuit, execute, transpile
from dell_runtime import DellRuntimeProvider
provider = DellRuntimeProvider()
provider.remote('http://qdr-dev.oro-sandbox-small1.k8s.cec.lab.emc.com')
provider.runtime.programs()
RUNTIME_PROGRAM = """
from qiskit.compiler import transpile, schedule
... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
RUNTIME_PROGRAM = """
# This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root d... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
import logging
import requests
import time
RUNTIME_PROGRAM = """
# This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
import os
import logging
logging.basicConfig(level=logging.DEBUG)
RUNTIME_PROGRAM = """
# This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | import itertools
import json
import numpy as np
from numpy.random import RandomState
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.compiler import transpile
from cvxopt import matrix, solvers # pylint: disable=import-error
class QKA:
def __init__(self, feature_map, backend, initial_layou... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | #!/usr/bin/env python
# coding: utf-8
# In[2]:
from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
import pandas as pd
from time import sleep
import os
import base64
import shutil
import json
# here = os.path.dirname(os.path.realpath(__file__))
# zipped = shutil.make_archive(h... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
import logging
import requests
import time
import os
RUNTIME_PROGRAM = """
# This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a c... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications ... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | import itertools
import json
import numpy as np
from numpy.random import RandomState
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.compiler import transpile
from cvxopt import matrix, solvers # pylint: disable=import-error
from .qka import QKA
class FeatureMap:
def __init__(self, feat... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | import itertools
import json
import numpy as np
from numpy.random import RandomState
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.compiler import transpile
from cvxopt import matrix, solvers # pylint: disable=import-error
|
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | import itertools
import json
import numpy as np
from numpy.random import RandomState
from qiskit import QuantumCircuit, QuantumRegister
from qiskit.compiler import transpile
from cvxopt import matrix, solvers # pylint: disable=import-error
class QKA:
def __init__(self, feature_map, backend, initial_layou... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
RUNTIME_PROGRAM = """
# This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root d... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | from dell_runtime import DellRuntimeProvider
from qiskit import QuantumCircuit
import os
RUNTIME_PROGRAM_METADATA = {
"max_execution_time": 600,
"description": "Qiskit test program"
}
# PROGRAM_PREFIX = 'qiskit-test'
def main():
provider = DellRuntimeProvider()
here = os.path.dirname(os.... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or... |
https://github.com/qiskit-community/qiskit-dell-runtime | qiskit-community | # This code is part of qiskit-runtime.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications ... |
https://github.com/QuTech-Delft/quantuminspire | QuTech-Delft | import logging
import os
from projectq import MainEngine
from projectq.setups import linear
from projectq.ops import H, Rx, Rz, CNOT, CZ, Measure, All
from quantuminspire.credentials import get_authentication
from quantuminspire.api import QuantumInspireAPI
from quantuminspire.projectq.backend_qx import QIBa... |
https://github.com/QuTech-Delft/quantuminspire | QuTech-Delft | """Example usage of the Quantum Inspire backend with the Qiskit SDK.
A simple example that demonstrates how to use the SDK to create
a circuit to demonstrate conditional gate execution.
For documentation on how to use Qiskit we refer to
[https://qiskit.org/](https://qiskit.org/).
Specific to Quantum Inspire ... |
https://github.com/QuTech-Delft/quantuminspire | QuTech-Delft | """Example usage of the Quantum Inspire backend with the Qiskit SDK.
A simple example that demonstrates how to use the SDK to create
a circuit to create a Bell state, and simulate the circuit on
Quantum Inspire.
For documentation on how to use Qiskit we refer to
[https://qiskit.org/](https://qiskit.org/).
S... |
https://github.com/QuTech-Delft/quantuminspire | QuTech-Delft | import numpy as np
import os
from qiskit import transpile, QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit_aer import Aer
from qiskit.providers.basic_provider import BasicProvider
from qiskit.visualization import circuit_drawer, plot_histogram
from IPython.display import display, Math, Latex
f... |
https://github.com/QuTech-Delft/quantuminspire | QuTech-Delft | import time
import os
import numpy as np
from IPython.display import display
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister, transpile
from qiskit.visualization import plot_histogram, circuit_drawer
from quantuminspire.credentials import get_authentication
from quantuminspire.qiskit im... |
https://github.com/QuTech-Delft/quantuminspire | QuTech-Delft | """ Quantum Inspire SDK
Copyright 2022 QuTech Delft
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
https://github.com/QuTech-Delft/quantuminspire | QuTech-Delft | """ Quantum Inspire SDK
Copyright 2022 QuTech Delft
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ag... |
https://github.com/derek-wang-ibm/coding-with-qiskit | derek-wang-ibm | import qiskit
qiskit.__version__
from qiskit_ibm_runtime import QiskitRuntimeService
service = QiskitRuntimeService(channel="ibm_quantum", # ibm_cloud
token = 'YOURTOKENHERE')
QiskitRuntimeService.save_account(channel='ibm_quantum',
token =... |
https://github.com/derek-wang-ibm/coding-with-qiskit | derek-wang-ibm | from qiskit import QuantumCircuit
qc = QuantumCircuit(2)
qc.h(0)
qc.cx(0, 1)
qc.draw(output='mpl')
from qiskit.quantum_info import Pauli
ZZ = Pauli('ZZ')
ZI = Pauli('ZI')
IZ = Pauli('IZ')
XX = Pauli('XX')
XI = Pauli('XI')
IX = Pauli('IX')
observables = [ZZ, ZI, IZ, XX, XI, IX]
from qiskit_aer... |
https://github.com/derek-wang-ibm/coding-with-qiskit | derek-wang-ibm | from qiskit import QuantumCircuit
from qiskit.circuit.library import YGate, UnitaryGate
import numpy as np
SYGate = UnitaryGate(YGate().power(1/2), label=r"$\sqrt{Y}$")
SYdgGate = UnitaryGate(SYGate.inverse(), label=r"$\sqrt{Y}^\dag$")
def generate_1d_tfim_circuit(num_qubits, num_trotter_steps, rx_angle, num_c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.