Home Algorithms Commercialization Data Science Information Theories Quantum Theories Lab Linear Algebra
<< Rotation - Matrix Exponential PDF 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}$

Rotation about Pauli Axes

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 .$

Code Section Template

In [1]:
# Initialisation

import sys
sys.path.append('../')
from qtol import *
In [2]:
# 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)
Raw vector:   [1.+0.j 0.+0.j]
Normalised:   [1.+0.j 0.+0.j]
Text form:    |0>
$$\text{LaTeX form:}\quad\Ket{0}$$
Bloch Vector: [ 0.002  -0.0508  1.    ]
$$\cos(0.0\pi)\Ket0 + e^{i~0.0\pi}\sin(0.0\pi)\Ket1$$
Out[2]:

 

<< Rotation - Matrix Exponential Top Rotation by Phase Shift >>