Home | Algorithms | Commercialization | Data Science | Information Theories | Quantum Theories | Lab | Linear Algebra |
<< Rotation - Matrix Exponential | Rotation by Phase Shift >> |
$\require{cancel} \newcommand{\Ket}[1]{\left|{#1}\right\rangle} \newcommand{\Bra}[1]{\left\langle{#1}\right|} \newcommand{\Braket}[1]{\left\langle{#1}\right\rangle} \newcommand{\Rsr}[1]{\frac{1}{\sqrt{#1}}} \newcommand{\RSR}[1]{1/\sqrt{#1}} \newcommand{\Verti}{\rvert} \newcommand{\HAT}[1]{\hat{\,#1~}} \DeclareMathOperator{\Tr}{Tr}$
First created in September 2018
Rotation of $\theta$ about a Pauli Axis on the Bloch Sphere.
$R_x(\theta) =e^{-i{\theta\over 2}X} =\begin{bmatrix} \cos{\theta\over 2} & -i\sin{\theta\over 2}\\ -i\sin{\theta\over 2} & \cos{\theta\over 2} \end{bmatrix} .~~ R_x(\pi)=-iX .$
$R_y(\theta) =e^{-i{\theta\over 2}Y} =\begin{bmatrix} \cos{\theta\over 2} & -\sin{\theta\over 2}\\ \sin{\theta\over 2} & \cos{\theta\over 2} \end{bmatrix} .~~ R_y(\pi)=-iY .$
$R_z(\theta) =e^{-i{\theta\over 2}Z} =\begin{bmatrix} e^{-i\theta/2} & 0\\ 0 & e^{i\theta/2} \end{bmatrix} .~~ R_z(\pi)=-iZ .$
# Initialisation
import sys
sys.path.append('../')
from qtol import *
# Iteration
# Number of qubits
qbNum = 1
# Define the Quantum and Classical Registers
q = QuantumRegister(qbNum)
c = ClassicalRegister(qbNum)
qc = QuantumCircuit(q, c)
# Preparation
qc.iden(q)
# Circuit building
# ...
# Finalisation
# ...
show_me(qc, q, c, show_latex=True, show_bloch_vector=True, show_histogram=True)
circuit_drawer(qc)
<< Rotation - Matrix Exponential | Top | Rotation by Phase Shift >> |