mindquantum.algorithm.qaia.LSB

View Source On AtomGit
class mindquantum.algorithm.qaia.LSB(J, h=None, x=None, n_iter=1000, batch_size=1, backend='cpu-float32', dt=1, xi=None, threshold=8)[source]

Logarithmic Quantized Simulated Bifurcation.

Reference: Quantized Simulated Bifurcation for the Ising Model.

Note

For memory efficiency, the input array 'x' is not copied and will be modified in-place during optimization. If you need to preserve the original data, please pass a copy using x.copy().

Parameters
  • J (Union[numpy.array, scipy.sparse.spmatrix]) – The coupling matrix with shape \((N x N)\).

  • h (numpy.array) – The external field with shape \((N, )\).

  • x (numpy.array) – The initialized spin value with shape \((N x batch_size)\). Default: None.

  • n_iter (int) – The number of iterations. Default: 1000.

  • batch_size (int) – The number of sampling. Default: 1.

  • backend (str) – Computation backend and precision to use: 'cpu-float32', 'gpu-float32'. Default: 'cpu-float32'.

  • dt (float) – The step size. Default: 1.

  • xi (float) – positive constant with the dimension of frequency. Default: None.

  • threshold (int) – dynamic threshold. Default: 8.

update()[source]

Dynamical evolution based on Modified explicit symplectic Euler method.