Skip to content
This repository was archived by the owner on Nov 7, 2024. It is now read-only.
This repository was archived by the owner on Nov 7, 2024. It is now read-only.

quantum operators #393

Open
Open
@mganahl

Description

@mganahl

This is related to #366, #379 and #390
For backend independent initialization of e.g. MPOs we need abstract quantum operators like
e.g. spin (Sx, Sy, Sz) or fermionic/bosonic ladder operators.

The initialization for MPOs I have in mind is

import tensornetwork as tn
backend='numpy'
Sx = tn.quantum.Sx(backend=backend)
Sy = tn.quantum.Sy(backend=backend)
Sz = tn.quantum.Sz(backend=backend)
J = 1
N = 10
mpo = tn.FiniteMPO(backend=backend)
for n in range(N-1):
  mpo.add_two_body_term(Sx, Sx, n, n+1, J)
  mpo.add_two_body_term(Sy, Sy, n, n+1, J)
  mpo.add_two_body_term(Sz, Sz, n, n+1, J)
mpo.finalize()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions