openjij
Framework for the Ising model and QUBO.
Loading...
Searching...
No Matches
openjij.utils.graph_utils Namespace Reference

Functions

 qubo_to_ising (np.ndarray mat)
 
 chimera_to_ind (int r, int c, int z, int L)
 

Function Documentation

◆ chimera_to_ind()

openjij.utils.graph_utils.chimera_to_ind ( int  r,
int  c,
int  z,
int  L 
)
[summary]

Args:
    r (int): row index
    c (int): column index
    z (int): in-chimera index (must be from 0 to 7)
    L (int): height and width of  chimera-units (total number of spins is :math:`L \\times L \\times 8`)

Raises:
    ValueError: [description]

Returns:
    int: corresponding Chimera index

◆ qubo_to_ising()

openjij.utils.graph_utils.qubo_to_ising ( np.ndarray  mat)
Inplace-convert numpy matrix from qubo to ising.

Args:
    mat (np.ndarray): numpy matrix