from qiskit.opflow.primitive_ops import PrimitiveOp
from qiskit.quantum_info import Pauli

primop_piXZ = PrimitiveOp(Pauli('-XZ'))
print(primop_piXZ)
print(type(primop_piXZ))

from qiskit.opflow import X, Z

pauli_piXZ = -(X ^ Z)
print(type(pauli_piXZ))
print(primop_piXZ.primitive
      .equiv(pauli_piXZ.primitive))


from qiskit import QuantumCircuit

qc = QuantumCircuit(3)
qc.h([0,1,2])

h_primop = PrimitiveOp(qc)
print(h_primop)
print(type(h_primop))

from qiskit.opflow import H

hgates = H^3
print(hgates)
print(type(hgates))