Skip to content

prayass/1D-Ising-Spin-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

⚛️ Quantum Simulation of the 1D Transverse Field Ising Model (TFI)

Made with Qiskit

1. Project overview

This project implements a quantum simulation of the time evolution of a 1D Transverse Field Ising (TFI) model, a critical many-body system in condensed matter physics.

The simulation utilizes Qiskit, IBM's open-source quantum computing framework, and focuses on implementing the Trotter-Suzuki decomposition to convert continuous time evolution into discrete quantum circuits.

Key Contributions & Advanced Analysis

This project goes beyond a basic implementation by providing a rigorous analysis of simulation fidelity:

  1. Higher-Order Trotterization: Implemented and compared the First-Order $(\mathcal{O}(Δt^2 )$ error) and Second-Order $(\mathcal{O}(Δt^3)$ error) Trotter-Suzuki decompositions to demonstrate improved convergence and controlled trade-offs between circuit depth and accuracy.
  2. Nearest-Neighbor Spin-Spin Correlation: Quantifies the entanglement and interaction strength between adjacent spins.

2. Theoretical Background

The system is described by a 1D Transverse field Ising(TFI) hamiltonian, which acts on N qubits

$$H=\sum_{i=1}^{N-1}\sigma_{i}^Z \sigma_{i+1}^Z+B\sum_{i=1}^{N}\sigma_{i}^X $$

where

  • J(coupling strength) and B(transverse field) are set to 1 for simplicity.
  • The system is initialized in equal superposition ($\Pi_{i}\ket{\psi}_{i}=\ket{+}^{\otimes N}$)

Trotter-Suzuki Decomposition

The goal is to simulate the time evolution operator $U(t)=e^{-iHt}$. Since H is a sum of non-commuting components, ($H_{ZZ}$ and $H_{X}$), we approximate the evolution over steps, where $\Delta t=t/r$

First-Order (Standard)

$$U(\Delta t) \approx U_{ZZ}\bigl(\Delta t\bigl) U_{X}\bigl(\Delta t \bigl)$$

Second-Order (Symmetric)

$$U(\Delta t) \approx U_{x}\biggl(\frac{\Delta t}{2} \biggl)U_{ZZ}\bigl(\Delta t \bigl) U_{X}\biggl(\frac{\Delta t}{2}\biggl) $$

The second-order method significantly reduces the Trotter error, allowing for greater simulation fidelity with fewer overall Trotter steps.

3. Implementation details

The simulation is implemented entirely using Python and Qiskit.

Hamiltonian Term Qiskit Circuit Implementation Function Name
$e^{-iJ\sigma_{i}^{z}\sigma_{i+1}^{z}\Delta t}$ Pair of CNOT gates sandwiching an $R_z$ rotation. get_zz_coupling_gate
$e^{-iB\sigma_{i}^{x}\Delta t}$ Single $R_x$ rotation on each qubit. get_x_field_gate

All simulation runs use the qiskit_aer.Aer.get_backend('qasm_simulator') with a finite number of shots (shots = 8192) to mimic the stochastic nature of real quantum hardware measurement.

4. Result and Analysis

The main script runs both the 1st and 2nd order methods for $r=1$ to $r=30$ Trotter steps and plots the results against a reference value (taken as the highly converged 2nd-order result).

Alt Text

This histogram provides a snapshot of the quantum state of your 4-qubit Ising chain simulation ($\mathbf{N=4}$) after time evolution up to $t=1.57$ (which is approximately $\pi/2$).

Interpretation

This high probability on the $|0000\rangle$ and $|1111\rangle$ states suggests that, at this moment in time ($t=1.57$), the system is highly ferromagnetically ordered in the z-basis. It prefers to have all spins aligned, either all up or all down.

.

Alt Text

1. Convergence to the Reference Value:

As the number of Trotter steps ($\mathbf{r}$) increases, the effective time step ($\mathbf{\Delta t = t_{\text{final}} / r}$) decreases. For both the 1st and 2nd order methods, the calculated observable value approaches the dashed Reference line. This confirms that the Trotterization is correctly simulating the time evolution of the quantum system.

2. The Superiority of the 2nd Order Method:

The 2nd Order Trotter curve (symmetric) reaches the Reference line much faster (at a lower value of $r$) than the 1st Order curve .For any given small number of steps ($r \le 10$), the 2nd Order result is significantly closer to the true value than the 1st Order result.

3. Physical Meaning of the Observables:

Magnetization ($\langle \sigma_0^z \rangle$): This value is expected to oscillate or change over time as the initial $|\psi\rangle = |+\rangle^{\otimes N}$ state (which is an eigenstate of $\sigma^x$) evolves under the influence of the $\sigma^z \sigma^z$ couplings. The plot shows the final value after the total time $t_{\text{final}}$.

Spin-Spin Correlation ($\langle \sigma_0^z \sigma_1^z \rangle$): This tells you how ordered or entangled the system is. In the TFI model, this value is crucial for understanding phase behavior. The final value at $t_{\text{final}}$ indicates the degree of $Z$-basis correlation achieved.

4. Absolute Error Comparison (Log Scale Plot):

The curve for the 2nd Order Trotter (Error $\propto 1/r^3$) drops much steeper than the curve for the 1st Order Trotter (Error $\propto 1/r^2$).This indicates As you double the number of steps ($r \to 2r$), the error in the 1st order method drops by a factor of $4$ ($2^2$), but the error in the 2nd order method drops by a factor of $\mathbf{8}$ ($\mathbf{2^3}$). This factor of 2 difference in the error reduction is what makes the 2nd order curve plunge so much faster, visually confirming the theoretical $\mathcal{O}(\Delta t^3)$ superiority.

5. Getting Started

Prerequisites

  • Python 3.8+
  • Qiskit 1.0+

About

This is a Quantum simulation project using Qiskit to model the time evolution of a 4-qubit Ising spin chain and analyze convergence rates.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors