Quantum Computing Approach
Semester II
Sheng Yun Wu
Semester II
Sheng Yun Wu
Classical Physics Explanation
Hysteresis in antiferromagnetic materials refers to the lag between the external magnetic field applied and the material's response. Still, in contrast to ferromagnetic materials, the magnetic moments of neighboring atoms in antiferromagnets are aligned in opposite directions. This alignment causes the net magnetization of the material to be zero or very small.
However, antiferromagnetic materials still exhibit a hysteresis loop when subjected to an external magnetic field. The material's response to the field is determined by:
Exchange Coupling: The interaction between neighboring magnetic moments that causes them to align in opposite directions.
Sublattice Magnetization: In an antiferromagnet, the material can be divided into sublattices where the magnetic moments are oriented in opposite directions.
Critical Field: The external magnetic field is required to overcome the internal exchange interactions and reorient the magnetic moments.
Antiferromagnetic Hysteresis Loop: Antiferromagnets exhibit a hysteresis loop similar to ferromagnetic materials. However, it is typically more subtle and shows behavior related to reversing the staggered magnetic moments rather than the net magnetization.
In quantum computing, qubits can represent the magnetization states of the sublattices in an antiferromagnetic material, and quantum gates can simulate the application and removal of external magnetic fields that change the alignment of the magnetic moments. Hadamard gates, Pauli-X gates, and Phase gates can be used to simulate the behavior of the staggered magnetization and how the system evolves when an external field is applied and removed.
In this Qiskit program, we simulate the hysteresis loop of an antiferromagnetic material using qubits. Each qubit represents a sublattice of magnetic moments aligned in opposite directions, and quantum gates will simulate the behavior of the magnetic moments under an external magnetic field and how they reverse their alignment in response to the field.
from qiskit import QuantumCircuit, Aer, execute
from qiskit.visualization import plot_histogram, plot_bloch_multivector
import numpy as np
# Step 1: Create a quantum circuit with 2 qubits (representing the two sublattices in the antiferromagnetic material)
qc = QuantumCircuit(2)
# Step 2: Initialize both qubits in the |0> state (representing the initial antiparallel alignment of magnetic moments)
qc.initialize([1, 0], 0) # Qubit 0 represents sublattice A
qc.initialize([1, 0], 1) # Qubit 1 represents sublattice B (aligned opposite to A)
# Step 3: Apply a Hadamard gate to both qubits to simulate superposition (representing the initial response to the external field)
qc.h(0)
qc.h(1)
# Step 4: Apply Pauli-X gates to simulate the flipping of magnetic moments under an external magnetic field
# Qubit 0 (sublattice A) and Qubit 1 (sublattice B) flip their states, simulating a realignment of moments in the field
qc.x(0)
qc.x(1)
# Step 5: Apply a Phase gate to simulate energy losses and lag (representing the hysteresis effect due to exchange interactions)
qc.p(np.pi / 4, 0)
qc.p(np.pi / 4, 1)
# Step 6: Reverse the magnetic field by applying another Pauli-X gate (simulating the reversal of the external magnetic field)
qc.x(0)
qc.x(1)
# Step 7: Apply another Phase gate to simulate coercivity and remanence in the antiferromagnetic hysteresis loop
qc.p(np.pi / 2, 0)
qc.p(np.pi / 2, 1)
# Step 8: Visualize the qubits' states on the Bloch sphere to observe the hysteresis effect (lag between field and magnetic moment reversal)
state = Aer.get_backend('statevector_simulator')
job = execute(qc, state)
final_state = job.result().get_statevector(qc)
plot_bloch_multivector(final_state)
# Step 9: Measure both qubits to observe the final state of the sublattice magnetization (after the hysteresis loop is complete)
qc.measure_all()
# Step 10: Simulate the measurement and plot the results
simulator = Aer.get_backend('qasm_simulator')
job = execute(qc, simulator, shots=1024)
result = job.result()
counts = result.get_counts(qc)
# Print the measurement results and plot the histogram (representing the final state of the sublattices after hysteresis)
print(f"Measurement results: {counts}")
plot_histogram(counts)
# Draw the quantum circuit
qc.draw(output='mpl')
Step 1: Create the Quantum Circuit
We create a quantum circuit with 2 qubits, each representing one of the sublattices in an antiferromagnetic material. Following a hysteresis loop, the qubits will simulate how the magnetic moments in the sublattices respond to the external magnetic field.
qc = QuantumCircuit(2)
Step 2: Initialize the Qubits
Both qubits are initialized in the ∣0⟩ state, representing the antiferromagnet's initial antiparallel alignment of magnetic moments. Sublattice A is represented by qubit 0, and sublattice B is represented by qubit 1, with their magnetic moments aligned in opposite directions.
qc.initialize([1, 0], 0)
qc.initialize([1, 0], 1)
Step 3: Apply Hadamard Gates (H Gates)
Hadamard gates are applied to each qubit to place them in a superposition of ∣0⟩ and ∣1⟩, representing the beginning of the response to the external magnetic field. The superposition reflects the initial uncertainty in how the magnetic moments will realign when the field is applied.
The magnetic moments are now partially aligned, setting up the system to follow the hysteresis loop.
qc.h(0)
qc.h(1)
Step 4: Apply Pauli-X Gates (X Gates) to Simulate Magnetization Reversal
Pauli-X gates are applied to both qubits to simulate the realignment of the magnetic moments under an external magnetic field. In an antiferromagnet, the magnetic moments in the two sublattices may flip in response to the field, but they will still remain in opposite directions.
This gate simulates the reversal of the magnetic moments in response to the external field.
qc.x(0)
qc.x(1)
Step 5: Apply Phase Gates (P Gates) to Simulate the Hysteresis Effect
Phase gates are applied to both qubits to simulate the lag in the realignment of the magnetic moments due to the exchange interactions between neighboring spins. This phase shift represents the energy losses and lag associated with the hysteresis effect in an antiferromagnetic material.
qc.p(np.pi / 4, 0)
qc.p(np.pi / 4, 1)
Step 6: Reverse the Magnetic Field (Another Pauli-X Gate)
Another Pauli-X gate is applied to both qubits to simulate the reversal of the external magnetic field. This step represents applying a magnetic field in the opposite direction, forcing the magnetic moments to realign again but in opposite directions.
qc.x(0)
qc.x(1)
Step 7: Apply Another Phase Gate (P Gate) to Simulate Coercivity and Remanence
A second Phase gate is applied to both qubits to simulate the remanence (residual alignment of magnetic moments) and coercivity (the amount of external field required to reverse the alignment). This phase shift represents the material's resistance to full realignment during the field reversal due to the internal exchange forces in the antiferromagnetic material.
qc.p(np.pi / 2, 0)
qc.p(np.pi / 2, 1)
Step 8: Visualize the Bloch Sphere
We use the Bloch sphere to visualize the qubits' states after applying the quantum gates. The Bloch sphere shows how the magnetic moments evolve during the hysteresis process, representing the staggered magnetization of the antiferromagnetic material and its response to the external magnetic field.
state = Aer.get_backend('statevector_simulator')
job = execute(qc, state)
final_state = job.result().get_statevector(qc)
plot_bloch_multivector(final_state)
Step 9: Measurement
We measure both qubits to observe the final staggered magnetization state of the antiferromagnetic material after completing the hysteresis loop. The measurement collapses the qubits into either the ∣0⟩ or ∣1⟩ states, representing the state of each sublattice.
qc.measure_all()
Step 10: Simulate the Measurement and Plot the Results
We simulate the quantum circuit using the Qasm simulator, which runs the circuit multiple times (1024 shots) and records the measurement outcomes. These results represent the final state of the sublattices after the external field has been applied and reversed, showing the behavior of the antiferromagnetic material during the hysteresis process.
simulator = Aer.get_backend('qasm_simulator')
job = execute(qc, simulator, shots=1024)
result = job.result()
counts = result.get_counts(qc)
Finally, we plot the measurement results using a histogram, showing the distribution of the states of the two sublattices after completing the hysteresis loop.
print(f"Measurement results: {counts}")
plot_histogram(counts)
In classical physics, hysteresis in antiferromagnetic materials describes how the magnetic moments in different sublattices respond to an applied magnetic field, following a hysteresis loop. The magnetic moments in antiferromagnetic materials align in opposite directions (antiparallel), and the net magnetization is very small. However, when an external magnetic field is applied, the magnetic moments realign, but this realignment does not immediately follow the external field due to exchange interactions between neighboring spins.
The Pauli-X gates simulate the realignment of the magnetic moments in response to the external magnetic field.
The Phase gates simulate the lag in the response of the magnetic moments, representing the hysteresis effect, coercivity, and remanence.
This program helps students understand the hysteresis loop in antiferromagnetic materials by simulating the behavior of magnetic moments in sublattices using qubits. The Bloch sphere visualization provides an intuitive way to see how the magnetic moments of sublattices evolve during the application and reversal of a magnetic field, and the quantum circuit demonstrates the subtle hysteresis effect in antiferromagnetic materials.
Hysteresis in antiferromagnetic materials describes how the magnetic moments in different sublattices respond to an external magnetic field. Using quantum computing principles, we can simulate this process with qubits, applying Pauli-X gates to model the realignment of the magnetic moments and Phase gates to simulate the hysteresis effect, including lag, coercivity, and remanence. This Qiskit simulation provides an interactive way to explore the behavior of antiferromagnetic materials during hysteresis and understand their magnetic properties.
Reference: