repo stringclasses 900
values | file stringclasses 754
values | content stringlengths 4 215k |
|---|---|---|
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 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 modifications or... |
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 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 modifications or... |
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 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 modifications or... |
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 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 modifications or... |
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 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 modifications or... |
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 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 modifications or... |
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 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 modifications or... |
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 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 modifications or... |
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # -*- 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/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # -*- 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.
#
#... |
https://github.com/indian-institute-of-science-qc/qiskit-aakash | indian-institute-of-science-qc | # -*- 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/yh08037/quantum-neural-network | yh08037 | import numpy as np
import matplotlib.pyplot as plt
import torch
from torch.autograd import Function
from torchvision import datasets, transforms
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
from torchsummary import summary
import qiskit
from qiskit.visualization impo... |
https://github.com/yh08037/quantum-neural-network | yh08037 | import numpy as np
import matplotlib.pyplot as plt
import torch
from torch.autograd import Function
from torchvision import datasets, transforms
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
from torchsummary import summary
import qiskit
from qiskit.visualization impo... |
https://github.com/yh08037/quantum-neural-network | yh08037 | # !pip install qiskit-aer-gpu
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import torch
from torch.autograd import Function
from torchvision import datasets, transforms
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
# from torchsummary import s... |
https://github.com/yh08037/quantum-neural-network | yh08037 | import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import torch
from torch.autograd import Function
from torchvision import datasets, transforms
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
# from torchsummary import summary
import qiskit
from qis... |
https://github.com/yh08037/quantum-neural-network | yh08037 | import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import torch
from torch.autograd import Function
from torchvision import datasets, transforms
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
# from torchsummary import summary
import qiskit
from qis... |
https://github.com/ttlion/ShorAlgQiskit | ttlion | """
This is the final implementation of Shor's Algorithm using the circuit presented in section 2.3 of the report about the first
simplification introduced by the base paper used.
As the circuit is completely general, it is a rather long circuit, with a lot of QASM instructions in the generated Assembly code,
wh... |
https://github.com/ttlion/ShorAlgQiskit | ttlion | """
This is the final implementation of Shor's Algorithm using the circuit presented in section 2.3 of the report about the second
simplification introduced by the base paper used.
The circuit is general, so, in a good computer that can support simulations infinite qubits, it can factorize any number N. The only lim... |
https://github.com/ttlion/ShorAlgQiskit | ttlion | """ This file allows to test the Multiplication blocks Ua. This blocks, when put together as explain in
the report, do the exponentiation.
The user can change N, n, a and the input state, to create the circuit:
up_reg |+> ---------------------|----------------------- |+>
... |
https://github.com/ttlion/ShorAlgQiskit | ttlion | """ This file allows to test the various QFT implemented. The user must specify:
1) The number of qubits it wants the QFT to be implemented on
2) The kind of QFT want to implement, among the options:
-> Normal QFT with SWAP gates at the end
-> Normal QFT without SWAP gates at the end
... |
https://github.com/qiskit-community/qgss-2024 | qiskit-community | # required imports:
from qiskit.visualization import array_to_latex
from qiskit.quantum_info import Statevector, random_statevector
from qiskit.quantum_info.operators import Operator, Pauli
from qiskit import QuantumCircuit
from qiskit.circuit.library import HGate, CXGate
import numpy as np
ket0 = [[1],[0]]
... |
https://github.com/qiskit-community/qgss-2024 | qiskit-community | from qiskit.circuit import QuantumCircuit
from qiskit.primitives import Estimator, Sampler
from qiskit.quantum_info import SparsePauliOp
from qiskit.visualization import plot_histogram
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('dark_background') # optional
# create excited |1> state
q... |
https://github.com/qiskit-community/qgss-2024 | qiskit-community | from qiskit import QuantumCircuit, Aer, execute
import numpy as np
from qiskit.visualization import plot_histogram
import matplotlib.pyplot as plt
from math import gcd
#QFT Circuit
def qft(n):
"""Creates an n-qubit QFT circuit"""
circuit = QuantumCircuit(n)
def swap_registers(circuit, n):
... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is a Qiskit project.
# (C) Copyright IBM 2024.
# 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 derivati... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is part of Qiskit.
#
# (C) Copyright IBM 2023.
#
# 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-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | from qiskit import QuantumCircuit
from qiskit.quantum_info import SparsePauliOp
from circuit_knitting.cutting import (
partition_problem,
generate_cutting_experiments,
)
circuit = QuantumCircuit(2)
circuit.h(0)
circuit.cx(0, 1)
observable = SparsePauliOp(["ZZ"])
partitioned_problem = partition_pro... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | import numpy as np
from qiskit.circuit.library import EfficientSU2
from qiskit.quantum_info import SparsePauliOp
from circuit_knitting.cutting import (
partition_problem,
generate_cutting_experiments,
)
circuit = EfficientSU2(4, entanglement="linear", reps=2).decompose()
circuit.assign_parameters([0... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | import numpy as np
from qiskit import QuantumCircuit
from qiskit.quantum_info import SparsePauliOp
from qiskit_aer.primitives import EstimatorV2, SamplerV2
from circuit_knitting.cutting import (
partition_problem,
generate_cutting_experiments,
reconstruct_expectation_values,
)
from circuit_knit... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | from qiskit.circuit.library import EfficientSU2
qc = EfficientSU2(4, entanglement="linear", reps=2).decompose()
qc.assign_parameters([0.4] * len(qc.parameters), inplace=True)
qc.draw("mpl", scale=0.8)
from qiskit.quantum_info import SparsePauliOp
observable = SparsePauliOp(["ZZII", "IZZI", "-IIZZ", "XIXI",... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | from qiskit.circuit.library import EfficientSU2
circuit = EfficientSU2(num_qubits=4, entanglement="circular").decompose()
circuit.assign_parameters([0.4] * len(circuit.parameters), inplace=True)
circuit.draw("mpl", scale=0.8)
from qiskit.quantum_info import SparsePauliOp
observable = SparsePauliOp(["ZZII", "... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | import numpy as np
from qiskit import QuantumCircuit
qc_0 = QuantumCircuit(7)
for i in range(7):
qc_0.rx(np.pi / 4, i)
qc_0.cx(0, 3)
qc_0.cx(1, 3)
qc_0.cx(2, 3)
qc_0.cx(3, 4)
qc_0.cx(3, 5)
qc_0.cx(3, 6)
qc_0.cx(0, 3)
qc_0.cx(1, 3)
qc_0.cx(2, 3)
qc_0.draw("mpl")
from qiskit.quantum_info import S... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | import numpy as np
from qiskit.circuit.random import random_circuit
from qiskit.quantum_info import SparsePauliOp
circuit = random_circuit(7, 6, max_operands=2, seed=1242)
observable = SparsePauliOp(["ZIIIIII", "IIIZIII", "IIIIIIZ"])
circuit.draw("mpl", scale=0.8)
from circuit_knitting.cutting.automated_c... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is a Qiskit project.
# (C) Copyright IBM 2023.
# 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 derivati... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is a Qiskit project.
# (C) Copyright IBM 2023.
# 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 derivati... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is a Qiskit project.
# (C) Copyright IBM 2024.
# 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 derivati... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is a Qiskit project.
# (C) Copyright IBM 2024.
# 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 derivati... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is a Qiskit project.
# (C) Copyright IBM 2024.
# 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 derivati... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is a Qiskit project.
# (C) Copyright IBM 2023.
# 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 derivati... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is a Qiskit project.
# (C) Copyright IBM 2023.
# 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 derivati... |
https://github.com/Qiskit-Extensions/circuit-knitting-toolbox | Qiskit-Extensions | # This code is a Qiskit project.
# (C) Copyright IBM 2023.
# 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 derivati... |
https://github.com/QuantumBarcelona/Qiskit-Hackathon-BCN | QuantumBarcelona | from typing import List, Optional
from qiskit import transpile, QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit.result import marginal_counts
import warnings
warnings.filterwarnings("ignore")
import math
pi=math.pi
from qiskit_ibm_provider import IBMProvider
provider = IBMProvider()
... |
https://github.com/QuantumBarcelona/Qiskit-Hackathon-BCN | QuantumBarcelona | import numpy as np
import matplotlib.pyplot as plt
plt.rcParams.update({'font.size': 16}) # enlarge fonts
# Import standard qiskit modules
from qiskit import QuantumCircuit, QuantumRegister
#For doing exact simulation you can use Statevector (feel free to use something else)
from qiskit.quantum_info impo... |
https://github.com/QuantumBarcelona/Qiskit-Hackathon-BCN | QuantumBarcelona | |
https://github.com/QuantumBarcelona/Qiskit-Hackathon-BCN | QuantumBarcelona | ## Black scholes, simulation parameters and basic imports
import matplotlib.pyplot as plt
import numpy as np
K = 100 # strike price
sigma = 0.4 # volatility in %
T = 1
r = 0
Smin = 50
Smax = 150
Nqubits = 4
#Define range of stock price
S = np.arange(Smin,Smax,5)
#Define the Payoff Function
def ca... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, Alpine Quantum Technologies GmbH 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/LICENS... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, Alpine Quantum Technologies GmbH 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/LICENS... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, Alpine Quantum Technologies GmbH 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/LICENS... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright Alpine Quantum Technologies GmbH 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Alpine Quantum Technologies GmbH 2023
#
# 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 modi... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Alpine Quantum Technologies GmbH 2023
#
# 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 modi... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, Alpine Quantum Technologies 2023
#
# 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/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Alpine Quantum Technologies GmbH 2023
#
# 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 modi... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Alpine Quantum Technologies GmbH 2023
#
# 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 modi... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Alpine Quantum Technologies GmbH 2023.
#
# 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 mod... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Copyright IBM 2019, Alpine Quantum Technologies GmbH 2023.
#
# 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/LICENS... |
https://github.com/qiskit-community/qiskit-aqt-provider | qiskit-community | # This code is part of Qiskit.
#
# (C) Alpine Quantum Technologies GmbH 2023
#
# 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 modi... |
https://github.com/JavaFXpert/qiskit4devs-workshop-notebooks | JavaFXpert | # !pip install qiskit==0.7.1
# Include the necessary imports for this program
import numpy as np
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister, execute
# Create a Quantum Register with 2 qubits
qr = QuantumRegister(2)
# Create a Classical Register with 2 bits
cr = ClassicalRegister(2)... |
https://github.com/JavaFXpert/qiskit4devs-workshop-notebooks | JavaFXpert | # Do the necessary import for our program
#!pip install qiskit-aqua
from qiskit import BasicAer
from qiskit.aqua.algorithms import Grover
from qiskit.aqua.components.oracles import LogicalExpressionOracle
from qiskit.tools.visualization import plot_histogram
log_expr = '((A & B) | (C & D)) & ~(A & D)'
algorith... |
https://github.com/JavaFXpert/qiskit4devs-workshop-notebooks | JavaFXpert | #!pip install qiskit
# Include the necessary imports for this program
import numpy as np
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute
# Create a Quantum Register with 3 qubits
qr = QuantumRegister(3)
# Create a Quantum Circuit from the quantum register. Bec... |
https://github.com/JavaFXpert/qiskit4devs-workshop-notebooks | JavaFXpert | #!pip install qiskit
# Include the necessary imports for this program
import numpy as np
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute
# Create a Quantum Register with 1 qubit (wire).
qr = QuantumRegister(1)
# Create a Classical Register with 1 bit (double w... |
https://github.com/JavaFXpert/qiskit4devs-workshop-notebooks | JavaFXpert | #!pip install qiskit
# Include the necessary imports for this program
import numpy as np
from qiskit import QuantumCircuit, ClassicalRegister, QuantumRegister
from qiskit import execute
# Create a Quantum Register with 1 qubit (wire).
qr = QuantumRegister(1)
# Create a Classical Register with 1 bit (double w... |
https://github.com/JavaFXpert/qiskit4devs-workshop-notebooks | JavaFXpert | #!pip install qiskit
# Do the usual setup, but without classical registers or measurement
import numpy as np
from qiskit import QuantumCircuit, QuantumRegister, execute
qr = QuantumRegister(1)
circ = QuantumCircuit(qr)
# Place an Ry gate with a −3π/4 rotation
circ.ry(-3/4 * np.pi, qr[0])
# Draw the ci... |
https://github.com/chunfuchen/qiskit-chemistry | chunfuchen | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 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.... |
https://github.com/chunfuchen/qiskit-chemistry | chunfuchen | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 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.... |
https://github.com/chunfuchen/qiskit-chemistry | chunfuchen | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 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.... |
https://github.com/chunfuchen/qiskit-chemistry | chunfuchen | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 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.... |
https://github.com/chunfuchen/qiskit-chemistry | chunfuchen | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 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.... |
https://github.com/chunfuchen/qiskit-chemistry | chunfuchen | # -*- 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.
#
#... |
https://github.com/Qiskit-Extensions/qiskit-ibm-experiment | Qiskit-Extensions | from qiskit import IBMQ
provider = IBMQ.load_account()
service = provider.experiment
experiment_data = service.experiment(experiment_id = '5524b504-2f59-11ed-a7c7-bc97e15b08d0')
print(experiment_data['creation_datetime'])
print(experiment_data['metadata']['user'])
from qiskit_ibm_experiment import IBMExperiment... |
https://github.com/Qiskit-Extensions/qiskit-ibm-experiment | Qiskit-Extensions | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021-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 ... |
https://github.com/Qiskit-Extensions/qiskit-ibm-experiment | Qiskit-Extensions | # This code is part of Qiskit.
#
# (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 or deriv... |
https://github.com/qiskit-community/qiskit-hackathon-korea-22 | qiskit-community | from qiskit_nature.problems.sampling.protein_folding.interactions.random_interaction import (
RandomInteraction,
)
from qiskit_nature.problems.sampling.protein_folding.interactions.miyazawa_jernigan_interaction import (
MiyazawaJerniganInteraction,
)
from qiskit_nature.problems.sampling.protein_folding.pe... |
https://github.com/qiskit-community/qiskit-hackathon-korea-22 | qiskit-community | # Import auxiliary libraries
# Import Qiskit
from qiskit import Aer
from qiskit.algorithms import QAOA, NumPyMinimumEigensolver
from qiskit.utils import QuantumInstance
from qiskit_optimization import QuadraticProgram
from qiskit_optimization.algorithms import MinimumEigenOptimizer
qp_ex = QuadraticProgram... |
https://github.com/qiskit-community/qiskit-hackathon-korea-22 | qiskit-community | ## import essential libraries
import numpy as np
from qiskit import *
from qiskit.tools.monitor import job_monitor
from qiskit import assemble,pulse,QuantumCircuit,schedule,transpile
from qiskit.pulse.channels import ControlChannel, DriveChannel
from qiskit.circuit import Gate
from qiskit.providers.aer imp... |
https://github.com/qiskit-community/qiskit-hackathon-korea-22 | qiskit-community | import numpy as np
# Importing standard Qiskit libraries
from qiskit import QuantumCircuit, transpile, IBMQ, schedule
import qiskit.pulse as pulse
from qiskit.circuit import Parameter
from qiskit_experiments.calibration_management import Calibrations
import pandas as pd
# Loading your IBM Quantum accou... |
https://github.com/qiskit-community/qiskit-cold-atom | qiskit-community | import qiskit_qasm3_import
project = 'Qiskit OpenQASM 3 Importer'
copyright = '2022, Jake Lishman'
author = 'Jake Lishman'
version = qiskit_qasm3_import.__version__
release = qiskit_qasm3_import.__version__
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"reno.sphinxext",
'q... |
https://github.com/qiskit-community/qiskit-cold-atom | qiskit-community | from qiskit_cold_atom.fermions import FermionSimulator
# initialize the generic fermionic simulator backend
backend = FermionSimulator()
from qiskit import QuantumCircuit
circ1 = QuantumCircuit(4) # Create a quantum circuit describing four fermionic modes.
circ1.fload([1, 2]) # Load fermions into modes 1... |
https://github.com/qiskit-community/qiskit-cold-atom | qiskit-community | from qiskit_cold_atom.spins import SpinSimulator
from qiskit import QuantumCircuit, QuantumRegister
backend = SpinSimulator()
qc = QuantumCircuit(4)
qc.measure_all()
# confirm that an empty circuit will return '0 0 0 0'
job = backend.run(qc, spin=3)
print(job.result().get_counts())
from qiskit_nature.seco... |
https://github.com/qiskit-community/qiskit-cold-atom | qiskit-community | from qiskit_cold_atom.providers import ColdAtomProvider
provider = ColdAtomProvider()
backend = provider.get_backend("fermionic_tweezer_simulator")
# give initial occupations separated by spin species
qc = backend.initialize_circuit([[1, 0, 0, 1], [0, 0, 1, 1]])
qc.draw(output='mpl', style='clifford')
qc.... |
https://github.com/qiskit-community/qiskit-cold-atom | qiskit-community | from qiskit_cold_atom.providers import ColdAtomProvider
provider = ColdAtomProvider()
backend = provider.get_backend("collective_spin_simulator")
from qiskit import QuantumCircuit
from qiskit_cold_atom.spins.spins_gate_library import OATGate
from qiskit.visualization import plot_histogram
qc = QuantumCircui... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.