An Object-Oriented Python Cookbook in Quantum Information Theory and Quantum Computing
This first-of-a-kind textbook provides computational tools in state-of-the-art OOPs Python that are fundamental to quantum information, quantum computing, linear algebra and one-dimensional spin half condensed matter systems. Over 104 subroutines are included, and the codes are aided by mathematical comments to enhance clarity. Suitable for beginner and advanced readers alike, students and researchers will find this textbook to be a helpful guide and a compendium which they can readily use.
- Includes over 104 codes in OOPs Python, all of which can be used either as a standalone program or integrated with any other main program without any issues.
- Every parameter in the input, output and execution has been provided while keeping both beginner and advanced users in mind.
- The output of every program is explained thoroughly with detailed examples.
- Detailed mathematical commenting is done alongside the code which enhances clarity about the flow and working of the code.
Cover Page Half-Title Page Title Page Copyright Page Dedication Page Contents Preface List of Figures Acknowledgment 1 Introduction to Python and Object-Oriented Programming 1.1 Variables 1.2 Data types 1.2.1 Integer 1.2.2 Real 1.2.3 Complex 1.2.4 String 1.2.5 Logical 1.2.6 List 1.2.7 Tuple 1.2.8 NumPy arrays 1.3 Operators 1.3.1 Arithmetic operators 1.3.2 Relational operators 1.3.3 Logical operators 1.4 Decisions 1.4.1 The if statement 1.4.2 The if else statement 1.4.3 The if elif else statement 1.5 Loops 1.5.1 The while loop 1.5.2 The for loop 1.6 Python file handling 1.7 Math module in Python 1.8 Functions in Python 1.9 Object-Oriented Programming (OOPs) 1.9.1 Creating the Human class 1.9.2 Making objects of the Human class 1.9.3 Sphere class 1.10 Module and library 1.11 SciPy 1.11.1 LAPACK 1.12 Computation time 1.13 Installation and backends 2 Basic Tools of Quantum Mechanics 2.1 Inner product between two vectors 2.1.1 For real and complex vectors 2.2 Norm of a vector 2.2.1 For a real or complex vector 2.3 Normalization of a vector 2.3.1 For a real or complex vector 2.4 Outer product of a vector 2.4.1 For real vectors 2.4.2 For complex vectors 2.5 Tensor product between two matrices 2.5.1 For real or complex matrices 2.6 Commutator between two matrices 2.6.1 For real or complex matrices 2.7 Anticommutator between two matrices 2.7.1 For real or complex matrices 2.8 Binary to decimal conversion 2.9 Decimal to binary conversion 2.10 Binary digits shift 2.11 Quantum state shift 2.11.1 For a real state 2.11.2 For a complex state 2.12 Complete example 3 Numerical Linear Algebra Operations 3.1 Inverse of a matrix 3.1.1 For a real or complex matrix 3.2 Function of a matrix 3.2.1 For a real symmetric matrix 3.2.2 For a complex Hermitian matrix 3.2.3 For a real or complex non-Hermitian matrix 3.3 Power of a matrix 3.3.1 For a real symmetric matrix 3.3.2 For a complex Hermitian matrix 3.3.3 For a real or complex non-Hermitian matrix 3.4 Trace norm of a matrix 3.4.1 For a real matrix 3.4.2 For a complex matrix 3.5 Hilbert-Schmidt norm of a matrix 3.5.1 For a real matrix 3.5.2 For a complex matrix 3.6 Absolute value of a matrix 3.6.1 For a real matrix 3.6.2 For a complex matrix 3.7 The Hilbert-Schmidt inner product between two matrices 3.7.1 For real or complex matrices 3.8 Gram-Schmidt orthogonalization 3.8.1 For real vectors 3.8.2 For complex vectors 3.9 Complete example 4 Quantum Information and Quantum Computation Tools 4.1 Frequently used quantum gates 4.1.1 The Pauli-X 4.1.2 The Pauli-Y 4.1.3 The Pauli-Z 4.1.4 The Hadamard gate 4.1.5 The phase gate 4.1.6 The rotation gate 4.1.7 The controlled NOT gate (CX gate) 4.1.8 The controlled Z gate (CZ gate) 4.1.9 The SWAP gate 4.1.10 The Toffoli gate (CCX, CCNOT, TOFF) 4.1.11 The Fredkin gate (CSWAP) 4.2 The Bell states 4.2.1 N/2 tensor product of |b1〉 Bell state 4.2.2 N/2 tensor product of |b2〉 Bell state 4.2.3 N/2 tensor product of |b3〉 Bell state 4.2.4 N/2 tensor product of |b4〉 Bell state 4.3 The N-qubit Greenberger-Horne-Zeilinger (GHZ) state 4.4 The N-qubit W state 4.5 The Generalized N-qubit Werner state 4.6 Shannon entropy 4.7 Linear entropy 4.7.1 For a real or complex density matrix 4.8 Relative entropy 4.8.1 Between two density matrices 4.9 Trace distance 4.9.1 Between two real or complex density matrices 4.10 Fidelity 4.10.1 Between two real or complex states 4.10.2 Between two real or complex density matrices 4.10.3 Between a state and a density matrix 4.11 Super fidelity 4.11.1 Between two real or complex density matrices 4.12 Bures distance 4.12.1 Between two real or complex states 4.12.2 Between two real or complex density matrices 4.13 Expectation value of an observable 4.13.1 For a real or complex state 4.13.2 For a real or a complex density matrix 4.14 Complete example 5 Quantification of Quantum Entanglement 5.1 Partial trace 5.1.1 For a real or complex state 5.1.2 For a real or complex density matrix 5.2 Partial transpose 5.2.1 For a real or complex state 5.2.2 For a real or complex density matrix 5.3 Concurrence 5.3.1 For a real or complex state 5.3.2 For a real or complex density matrix 5.3.3 Variants of concurrence 5.4 Block entropy 5.4.1 For a real or complex state 5.4.2 For a real or complex density matrix 5.5 Renyi entropy 5.5.1 For a real or complex density matrix 5.6 Negativity and logarithmic negativity 5.6.1 For a real or complex state 5.6.2 For a real or complex density matrix 5.7 Q measure or the Meyer-Wallach-Brennen measure 5.7.1 For a real or complex state 5.7.2 For a real or complex density matrix 5.8 Entanglement spectrum 5.8.1 For a real or complex density matrix 5.9 Residual entanglement for three qubits 5.9.1 For a real or complex state 5.9.2 For a real or complex density matrix 5.10 PPT criteria or the Peres positive partial transpose criteria 5.11 Reduction criteria 5.12 Complete example 6 One-Dimensional Quantum Spin-1/2 Chain Models 6.1 Hamiltonian of spins interacting with an external magnetic field 6.1.1 Hamiltonian of spins interacting with an external magnetic field in the X direction 6.1.2 Hamiltonian of spins interacting with an external magnetic field in the Y direction 6.1.3 Hamiltonian of spins interacting with an external magnetic field in the Z direction 6.2 Hamiltonian for the direct exchange spin–spin interaction 6.2.1 Spin–spin interaction in X direction 6.2.2 Spin–spin interaction in Y direction 6.2.3 Spin–spin interaction in Z direction 6.2.4 Variants of the Ising model 126.96.36.199 The homogeneous Ising model in a non-zero uniform magnetic field 188.8.131.52 The homogeneous transverse Ising model in a non-zero uniform magnetic field 6.3 The Heisenberg interaction 6.3.1 Variants of the Heisenberg model 184.108.40.206 The XXX model 220.127.116.11 The XYZ model 18.104.22.168 The Majumdar-Ghosh model 6.4 The Dzyaloshinskii-Moriya interaction 6.4.1 DM vector in X direction 6.4.2 DM vector in Y direction 6.4.3 DM vector in Z direction 6.4.4 An Illustrative example of constructing a combination Hamiltonian 7 Generating Random Matrices and Random Vectors 7.1 Random number generator for Gaussian distribution 7.1.1 For a real random matrix whose elements are chosen from the Gaussian distribution 7.1.2 For a complex random matrix whose real and imaginary parts are individually chosen from the Gaussian distribution 7.2 Random number generator for uniform distribution in the range (a,b) 7.2.1 For a real random matrix whose elements are chosen from uniform distribution 7.2.2 For a complex random matrix whose elements are chosen from uniform distribution 7.3 Random real symmetric matrices 7.4 Random complex Hermitian matrices 7.5 Random unitary matrices 7.5.1 Random real orthogonal matrix 7.5.2 Random complex unitary matrix 7.6 Real Ginibre matrix 7.7 Complex Ginibre matrix 7.8 Wishart matrices 7.8.1 Real Wishart matrix 7.8.2 Complex Wishart matrix 7.9 Random probability vector 7.10 Random pure quantum state vector 7.10.1 Random real state vector 7.10.2 Random pure complex state vector 7.11 Random density matrices 7.11.1 Random real density matrix 7.11.2 Random complex density matrix Bibliography Subject index
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.