SlideShare a Scribd company logo
1 of 4
Download to read offline
In [2]: import numpy as np # Numerical computation
import numpy.linalg as la # Linear Algebra
import matplotlib as mp # Generating plots
import matplotlib.pyplot as plt
plt.style.use('seaborn') # Setting the plotting style
mp.rcParams['figure.figsize'] = (9, 7) # Setting the size of the plots
%matplotlib notebook
In [3]: Nsites = 25 # Number of lattice sites
Nprime = 2*Nsites
e_threshold = 1E-6 # Threshold for finding zero eigenstates
params = {
't' : 2.0, # Nearest neighbor hopping
'Delta' : 2.0, # Superconducting pairing term
'mu' : 0.0 # Chemical potential
}
In [4]: def kitaev_ham(Nsites,params):
Hmat = np.zeros([Nprime,Nprime]) # Declare a 2Nx2N matrix
Jx = 0.5*(params['t'] - params['Delta'])
Jy = 0.5*(params['t'] + params['Delta'])
for n in range(Nsites-1):
Hmat[2*n,2*n+1] = Jx
Hmat[2*n+1,2*n] = -Jx
Hmat[2*n-1,2*n+2] = -Jy
Hmat[2*n+2,2*n-1] = Jy
Hmat[2*n-1,2*n] = params['mu']
Hmat[2*n,2*n-1] = -params['mu']
Hmat[2*(Nsites-1)-1,2*(Nsites-1)] = params['mu']
Hmat[2*(Nsites-1),2*(Nsites-1)-1] = -params['mu']
Hmat = 1j*Hmat
return Hmat
In [5]: def visualise_mat(Hmat):
plt.imshow(Hmat.imag) # The real part of the matrix is a zero matrix
plt.colorbar()
plt.show()
Majorana zero modes about:srcdoc
1 of 4 19-Aug-22, 7:36 PM
In [8]: def plot_spectrum(Hmat):
evals,evecs = la.eigh(Hmat)
evals = evals.real
plt.scatter(np.arange(len(evals)),evals)
plt.title('Energy Spectrum of Chain with {} Sites'.format(Nsites))
plt.show()
%matplotlib inline
plot_spectrum(kitaev_ham(Nsites,params))
In [9]: # Extract the indices of energy modes close to zero
def check_zeromodes(evals):
nzmodes = 0
zmodes_ind = np.where(abs(evals) <= e_threshold)[0]
return zmodes_ind,len(zmodes_ind)
Majorana zero modes about:srcdoc
2 of 4 19-Aug-22, 7:36 PM
In [10]: def plot_zeromodes(evals,evecs,params):
param_info = 'n'.join((
r'$mu=%.2f$' % (params['mu']),
r'$t=%.2f$' % (params['t']),
r'$Delta=%.2f$' % (params['Delta'])))
zmodes_ind,cnt_zmodes = check_zeromodes(evals)
if cnt_zmodes > 0:
fig,ax = plt.subplots(1,cnt_zmodes,figsize=(20, 10))
fig.suptitle('Probability distribution of Zero modes',fontsize=2
0, fontweight='bold')
for cnt in range(cnt_zmodes):
ax1 = ax[cnt]
ax1.plot(np.abs(evecs[:,zmodes_ind[cnt]])**2)
ax1.set_title('Edge mode {}'.format(cnt+1),fontsize=20)
ax1.set_xlabel('Site Number',fontsize=20)
ax1.set_ylabel('$|psi|^2$',fontsize=20)
ax1.text(0.43, 0.95, param_info, transform=ax1.transAxes, fon
tsize=16,
verticalalignment='top', bbox=dict(boxstyle="square",facecolor="w
hite"))
ax1.tick_params(axis='both', which='major', labelsize=16)
#plt.savefig('Edge_modes_Kitaev.pdf')
plt.show()
evals,evecs = la.eigh((kitaev_ham(Nsites,params)))
plot_zeromodes(evals,evecs,params)
Majorana zero modes about:srcdoc
3 of 4 19-Aug-22, 7:36 PM
In [11]: var_mu = np.linspace(0,4,101)
var_energy = np.zeros([len(var_mu),Nprime])
for i in range(len(var_mu)):
var_energy[i] = la.eigh(kitaev_ham(Nsites,params = {'t' : 2.0,'Delta'
: 2.0, 'mu' : var_mu[i]}))[0]
plt.title("Energy Spectrum as a function of $mu/t$ (N = 15)")
for i in range(Nprime):
plt.plot(var_mu,var_energy[:,i])
plt.ylabel('Energy')
plt.xlabel('$mu/t$')
plt.show()
In [ ]: #Original source: https://crangi.github.io/post/kitaev_chain/
#Executed by Bhadale IT, Aug 2022. No intention of any copyright infringm
ents, all code owned by respective owners
Majorana zero modes about:srcdoc
4 of 4 19-Aug-22, 7:36 PM

More Related Content

Similar to Majorana zero modes

Pointcuts and Analysis
Pointcuts and AnalysisPointcuts and Analysis
Pointcuts and Analysis
Wiwat Ruengmee
 

Similar to Majorana zero modes (20)

Regression Tree.pdf
Regression Tree.pdfRegression Tree.pdf
Regression Tree.pdf
 
DCSM report2
DCSM report2DCSM report2
DCSM report2
 
Itroroduction to R language
Itroroduction to R languageItroroduction to R language
Itroroduction to R language
 
Quantum neural network
Quantum neural networkQuantum neural network
Quantum neural network
 
maXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VIImaXbox starter69 Machine Learning VII
maXbox starter69 Machine Learning VII
 
Py lecture5 python plots
Py lecture5 python plotsPy lecture5 python plots
Py lecture5 python plots
 
nn network
nn networknn network
nn network
 
Nn examples
Nn examplesNn examples
Nn examples
 
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
QMC: Undergraduate Workshop, Tutorial on 'R' Software - Yawen Guan, Feb 26, 2...
 
MatplotLib.pptx
MatplotLib.pptxMatplotLib.pptx
MatplotLib.pptx
 
Pointcuts and Analysis
Pointcuts and AnalysisPointcuts and Analysis
Pointcuts and Analysis
 
curve fitting or regression analysis-1.pptx
curve fitting or regression analysis-1.pptxcurve fitting or regression analysis-1.pptx
curve fitting or regression analysis-1.pptx
 
Class 8b: Numpy & Matplotlib
Class 8b: Numpy & MatplotlibClass 8b: Numpy & Matplotlib
Class 8b: Numpy & Matplotlib
 
NumPy_Broadcasting Data Science - Python.pptx
NumPy_Broadcasting Data Science - Python.pptxNumPy_Broadcasting Data Science - Python.pptx
NumPy_Broadcasting Data Science - Python.pptx
 
lecture7.ppt
lecture7.pptlecture7.ppt
lecture7.ppt
 
ECE-PYTHON.docx
ECE-PYTHON.docxECE-PYTHON.docx
ECE-PYTHON.docx
 
DSP LAB COMPLETE CODES.docx
DSP LAB COMPLETE CODES.docxDSP LAB COMPLETE CODES.docx
DSP LAB COMPLETE CODES.docx
 
Ns network simulator
Ns network simulatorNs network simulator
Ns network simulator
 
Testing in those hard to reach places
Testing in those hard to reach placesTesting in those hard to reach places
Testing in those hard to reach places
 
Dsp manual
Dsp manualDsp manual
Dsp manual
 

More from Vijayananda Mohire

Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for Agriculture
Vijayananda Mohire
 

More from Vijayananda Mohire (20)

NexGen Solutions for cloud platforms, powered by GenQAI
NexGen Solutions for cloud platforms, powered by GenQAINexGen Solutions for cloud platforms, powered by GenQAI
NexGen Solutions for cloud platforms, powered by GenQAI
 
Certificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on MLCertificate- Peer Review of Book Chapter on ML
Certificate- Peer Review of Book Chapter on ML
 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and Engineering
 
Key projects Data Science and Engineering
Key projects Data Science and EngineeringKey projects Data Science and Engineering
Key projects Data Science and Engineering
 
Bhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAIBhadale IT Hub-Multi Cloud and Multi QAI
Bhadale IT Hub-Multi Cloud and Multi QAI
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAI
 
Azure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuitsAzure Quantum Workspace for developing Q# based quantum circuits
Azure Quantum Workspace for developing Q# based quantum circuits
 
Key projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AIKey projects in AI, ML and Generative AI
Key projects in AI, ML and Generative AI
 
My Journey towards Artificial Intelligence
My Journey towards Artificial IntelligenceMy Journey towards Artificial Intelligence
My Journey towards Artificial Intelligence
 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for Agriculture
 
Bhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for AgricultureBhadale IT Cloud Solutions for Agriculture
Bhadale IT Cloud Solutions for Agriculture
 
Bhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud OfferingsBhadale IT Intel and Azure Cloud Offerings
Bhadale IT Intel and Azure Cloud Offerings
 
GitHub Copilot-vijaymohire
GitHub Copilot-vijaymohireGitHub Copilot-vijaymohire
GitHub Copilot-vijaymohire
 
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical ImplicationsPractical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
Practical ChatGPT From Use Cases to Prompt Engineering & Ethical Implications
 
Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)Cloud Infrastructure - Partner Delivery Accelerator (APAC)
Cloud Infrastructure - Partner Delivery Accelerator (APAC)
 
Red Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise LinuxRed Hat Sales Specialist - Red Hat Enterprise Linux
Red Hat Sales Specialist - Red Hat Enterprise Linux
 
RedHat_Transcript_Jan_2024
RedHat_Transcript_Jan_2024RedHat_Transcript_Jan_2024
RedHat_Transcript_Jan_2024
 
Generative AI Business Transformation
Generative AI Business TransformationGenerative AI Business Transformation
Generative AI Business Transformation
 
Microsoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohireMicrosoft Learn Transcript Jan 2024- vijaymohire
Microsoft Learn Transcript Jan 2024- vijaymohire
 
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
Bhadale Group of Companies -Futuristic Products Brief-Ver 1.0
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

Majorana zero modes

  • 1. In [2]: import numpy as np # Numerical computation import numpy.linalg as la # Linear Algebra import matplotlib as mp # Generating plots import matplotlib.pyplot as plt plt.style.use('seaborn') # Setting the plotting style mp.rcParams['figure.figsize'] = (9, 7) # Setting the size of the plots %matplotlib notebook In [3]: Nsites = 25 # Number of lattice sites Nprime = 2*Nsites e_threshold = 1E-6 # Threshold for finding zero eigenstates params = { 't' : 2.0, # Nearest neighbor hopping 'Delta' : 2.0, # Superconducting pairing term 'mu' : 0.0 # Chemical potential } In [4]: def kitaev_ham(Nsites,params): Hmat = np.zeros([Nprime,Nprime]) # Declare a 2Nx2N matrix Jx = 0.5*(params['t'] - params['Delta']) Jy = 0.5*(params['t'] + params['Delta']) for n in range(Nsites-1): Hmat[2*n,2*n+1] = Jx Hmat[2*n+1,2*n] = -Jx Hmat[2*n-1,2*n+2] = -Jy Hmat[2*n+2,2*n-1] = Jy Hmat[2*n-1,2*n] = params['mu'] Hmat[2*n,2*n-1] = -params['mu'] Hmat[2*(Nsites-1)-1,2*(Nsites-1)] = params['mu'] Hmat[2*(Nsites-1),2*(Nsites-1)-1] = -params['mu'] Hmat = 1j*Hmat return Hmat In [5]: def visualise_mat(Hmat): plt.imshow(Hmat.imag) # The real part of the matrix is a zero matrix plt.colorbar() plt.show() Majorana zero modes about:srcdoc 1 of 4 19-Aug-22, 7:36 PM
  • 2. In [8]: def plot_spectrum(Hmat): evals,evecs = la.eigh(Hmat) evals = evals.real plt.scatter(np.arange(len(evals)),evals) plt.title('Energy Spectrum of Chain with {} Sites'.format(Nsites)) plt.show() %matplotlib inline plot_spectrum(kitaev_ham(Nsites,params)) In [9]: # Extract the indices of energy modes close to zero def check_zeromodes(evals): nzmodes = 0 zmodes_ind = np.where(abs(evals) <= e_threshold)[0] return zmodes_ind,len(zmodes_ind) Majorana zero modes about:srcdoc 2 of 4 19-Aug-22, 7:36 PM
  • 3. In [10]: def plot_zeromodes(evals,evecs,params): param_info = 'n'.join(( r'$mu=%.2f$' % (params['mu']), r'$t=%.2f$' % (params['t']), r'$Delta=%.2f$' % (params['Delta']))) zmodes_ind,cnt_zmodes = check_zeromodes(evals) if cnt_zmodes > 0: fig,ax = plt.subplots(1,cnt_zmodes,figsize=(20, 10)) fig.suptitle('Probability distribution of Zero modes',fontsize=2 0, fontweight='bold') for cnt in range(cnt_zmodes): ax1 = ax[cnt] ax1.plot(np.abs(evecs[:,zmodes_ind[cnt]])**2) ax1.set_title('Edge mode {}'.format(cnt+1),fontsize=20) ax1.set_xlabel('Site Number',fontsize=20) ax1.set_ylabel('$|psi|^2$',fontsize=20) ax1.text(0.43, 0.95, param_info, transform=ax1.transAxes, fon tsize=16, verticalalignment='top', bbox=dict(boxstyle="square",facecolor="w hite")) ax1.tick_params(axis='both', which='major', labelsize=16) #plt.savefig('Edge_modes_Kitaev.pdf') plt.show() evals,evecs = la.eigh((kitaev_ham(Nsites,params))) plot_zeromodes(evals,evecs,params) Majorana zero modes about:srcdoc 3 of 4 19-Aug-22, 7:36 PM
  • 4. In [11]: var_mu = np.linspace(0,4,101) var_energy = np.zeros([len(var_mu),Nprime]) for i in range(len(var_mu)): var_energy[i] = la.eigh(kitaev_ham(Nsites,params = {'t' : 2.0,'Delta' : 2.0, 'mu' : var_mu[i]}))[0] plt.title("Energy Spectrum as a function of $mu/t$ (N = 15)") for i in range(Nprime): plt.plot(var_mu,var_energy[:,i]) plt.ylabel('Energy') plt.xlabel('$mu/t$') plt.show() In [ ]: #Original source: https://crangi.github.io/post/kitaev_chain/ #Executed by Bhadale IT, Aug 2022. No intention of any copyright infringm ents, all code owned by respective owners Majorana zero modes about:srcdoc 4 of 4 19-Aug-22, 7:36 PM