test_construct_h_matrix.py 141 字节
Newer Older
Y
yangguohao 已提交
1 2 3 4 5 6
from paddle_quantum.utils import Hamiltonian

h = Hamiltonian([(1, 'Z0, Z1')])

print(h.construct_h_matrix())
print(h.construct_h_matrix(4))