This repository contains a simple Python script to simulate a very basic NMR experiment using Qiskit.
I simulated a quantum circuit with two qubits and two classical bits. The idea was to reproduce a simplified COSY experiment between
-
A
$\pi/2$ rotation around the x-axis is applied to both spins to prepare transverse magnetization. -
The system evolves under a Hamiltonian containing chemical shifts and isotropic J-coupling:
where
- The evolution time is chosen as:
which corresponds to the mixing period in a COSY-like experiment.
- Another
$\pi/2$ rotation around the x-axis is applied to both spins at the end of the sequence.
For a two-spin-½ system, the initial state is:
where each single-spin state is a 2-component vector (e.g. eigenstates of $(I_z)$). Thus the full Hilbert space is 4-dimensional, and all operators are constructed as Kronecker products of single-spin operators.
A pulse acting on spin
where, for example, rotation along x-axis is described as:
The full rotation is again a (4 \times 4) operator constructed by Kronecker products.
After the pulse, the system evolves freely under the Hamiltonian:
with:
This is the standard unitary time evolution for closed quantum systems.
It is not recorded a FID, but the final state is studied by counts on two classical bits. For this reason, the model is very simple