This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RFC XXXX Expression Language Syntax 10 2024 | |
Title: Expression Language Syntax Specification | |
Author: Lahiru, WSO2 | |
Status: Informational | |
Date: 10 2024 | |
Abstract |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import numpy as np | |
from random import randrange | |
from qiskit import * | |
from qiskit.circuit.library.standard_gates import XGate | |
numPairs = 1000 | |
winCount = 0 | |
for pair in range(numPairs): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import numpy as np | |
from qiskit import * | |
from qiskit.circuit.library.standard_gates import XGate | |
# Creating the circuit with 4 classical bits and 4 qbits | |
qc = QuantumCircuit(4,4) | |
# Creating the entanglement between players qubits | |
qc.h(1) | |
qc.cx(1,0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit, execute, Aer | |
from qiskit.visualization import plot_bloch_multivector | |
from math import pi | |
%matplotlib inline | |
# We need three qubits and two classical bits for the algorithm. | |
q = QuantumRegister(3,"q") | |
# We have to define classical registers one by one since | |
# we are applying the C_if gate later |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit, execute, Aer | |
from qiskit.visualization import plot_bloch_multivector | |
from math import pi | |
%matplotlib inline | |
q = QuantumRegister(1,"q") | |
c = ClassicalRegister(1,"c") | |
qc = QuantumCircuit(q,c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import all necessary objects and methods for quantum circuits | |
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit, execute, Aer | |
all_pairs = ['00','01','10','11'] | |
for pair in all_pairs: | |
# Creating the circuit with two classical bits and 2 qbits | |
qc = QuantumCircuit(2,2) | |
# Creating the entangled state | |
qc.h(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import all necessary objects and methods for quantum circuits | |
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit, execute, Aer | |
all_pairs = ['00','01','10','11'] | |
for pair in all_pairs: | |
# Creating the circuit with two classical bits and 2 qbits | |
qc = QuantumCircuit(2,2) | |
# Creating the entangled state | |
qc.h(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import numpy as np | |
from qiskit import * | |
from qiskit.tools.visualization import plot_histogram | |
# Creating quantum circuit with 3 qubits and 3 classical bits | |
qc = QuantumCircuit(3,3) | |
# Preparing inputs | |
qc.h(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import numpy as np | |
from qiskit import * | |
from qiskit.tools.visualization import plot_histogram | |
from qiskit.tools.visualization import plot_state_city | |
from qiskit.providers.aer import StatevectorSimulator | |
# Creating quantum circuit with 3 qubits | |
qc = QuantumCircuit(3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import numpy as np | |
from qiskit import * | |
from qiskit.tools.visualization import plot_histogram | |
# Creating a circuit with 3 quantum bits and 2 classical bit | |
qc = QuantumCircuit(2,1) | |
# Preparing inputs | |
qc.h(0) |
NewerOlder