from IPython.display import IFrame
IFrame(src="http://www.youtube.com/embed/tBnWG_95F9c", width=1920/2, height=1080/2)

from qiskit import *
circuit = QuantumCircuit(1,1)
circuit.x(0)

%matplotlib inline
circuit.draw(output='mpl')

simulator = Aer.get_backend('unitary_simulator')
result = execute(circuit, backend=simulator).result()
unitary = result.get_unitary()
print(unitary)

from qiskit import *
circuit = QuantumCircuit(1,1)
circuit.x(0)
simulator = Aer.get_backend('statevector_simulator')
result = execute(circuit, backend=simulator).result()
statevector = result.get_statevector()
print(statevector)

# in the video, we imported from qiskit.tools.visualization. 
# this part of Qiskit has been moved to qiskit.visualization, and we recommend using qiskit.visualization instead
from qiskit.visualization import plot_bloch_multivector
plot_bloch_multivector(statevector)

circuit = QuantumCircuit(1,1)
circuit.x(0)
circuit.measure([0], [0])
simulator = Aer.get_backend('qasm_simulator')
result = execute(circuit, backend=simulator, shots=1024).result()
counts = result.get_counts()
from qiskit.visualization import plot_histogram
plot_histogram(counts)

qiskit.__qiskit_version__

import qiskit.tools.jupyter
%qiskit_copyright