Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (30 sloc) 1.51 KB
# Experiment with IBM's Qiskit open-source framework for working with quantum computers
# on OpenShift 4.1 / OpenDataHub / CodeReady Containers
# This quickstart includes Qiskit Aqua
# (library of cross-domain quantum algorithms upon which applications for
# near-term quantum computing can be built).
# Aqua is designed to be extensible, and employs a pluggable framework where quantum algorithms can easily be added.
# It currently allows the user to experiment on chemistry, AI, optimization and finance applications
# for near-term quantum computers.
# See and for step-by-step instructions
# on installing Open Data Hub on CodeReady Containers/OpenShift 4.1
# You just need a physical server with RHEL 8.1 or Fedora 30.
# See qiskit tutorials at
# See also and
# Install a pip package in the current Jupyter kernel
import sys
!{sys.executable} -m pip install numpy qiskit matplotlib
import numpy as np
from qiskit import *
%matplotlib inline
circ = QuantumCircuit(3)
# Add a H gate on qubit 0, putting this qubit in superposition.
# Add a CX (CNOT) gate on control qubit 0 and target qubit 1, putting
# the qubits in a Bell state., 1)
# Add a CX (CNOT) gate on control qubit 0 and target qubit 2, putting
# the qubits in a GHZ state., 2)
You can’t perform that action at this time.