ising#
Functionality#
ising#
This program implements the Hamiltonian evolution of the Ising model:
\(H\) is the Hamiltonian operator, \(J\) is the coupling constant between spins, \(B\) is the external magnetic field strength, and \(x_j\) represents the state of the \(j\)-th qubit (spin).
ising.py#
Callee: IsingEvolution
Given the number of input qubits \(n\), coupling constant \(J\), external magnetic field strength \(B\), and evolution time \(t\), this program applies the unitary transformation corresponding to the Hamiltonian evolution to an \(n\)-qubit quantum system in the computational basis \(\ket{y}_n\):
The input state is defined as \(|y\rangle_n = |q_{n-1} \cdots q_1 q_0\rangle\), where \(x\) is the decimal value of the binary string \(q_{n-1} \cdots q_0\). In this program, the particles are arranged in a circuular manner. Each qubit represents a spin that can interact with its two nearest neighbors. In detail, the spin interacts with \(i\)-th particle and the \([(i+1)\text{ mod }n]\)-th particle. Then the Hamiltonian can be expressed as:
Test expectations:
The Ising energy of the bitstring \(y\) is stored in the phase of state \(\ket{y}\), which can be obtained through a state-vector backend.
Doc references: [5]
API#
qolumbina.programs.ising.ising#
- class IsingEvolution(input_qubits, J, B, t, name=None)[source]#
Bases:
QuantumCircuitImplements the Ising evolution for a 1D chain
- Parameters:
input_qubits (int) – Number of qubits in the system (\(n\)).
J (float) – Coupling constant \(J\).
B (float) – External magnetic field strength \(B\).
t (float) – Evolution time \(t\) (\(t > 0\)).
name (str | None) – Optional name for the circuit.
- Raises:
ValueError – If
tis negative.