# Analogue of julia ITensors.op() on the C++ side

+1 vote

Hello, I am working on implementing the expect(psi,"Sz") function on the C++ side. In Julia one can create operators (using Sz as an example) without a SiteSet, by doing something like

OpSz=ITensors.op("Sz",Index(2, "Site,S=1/2"))

In c++ I can see how to do something similar if I have SiteSet available. But is there a way in C++ to get an operator from just the string and and an Index (no SiteSet)?