We need a top-level interface, called TNQVMVisitor, that extends AllGateVisitor, but also provides an initialize() and finalize() method.
Initializing the wavefunction tensor, and other init functionality, can go in initialize. In finalize(), I'd like to see ITensorMPSVisitor take its cbits from Measurements and add them to the AcceleratorBuffer so that users can call getMeasurements() and view the measurement results.
Then in execute() we'll wrap the InstructionIterator loop with visitor->initialize() and visitor->finalize().
I'd also like to see the tnqvm/ directory restructured to have TNQVM, TNQVMBuffer, and TNQVMVisitor classes only, and subdirectories itensor/ and exatensor/ that hold visitors specific to those types.
We need a top-level interface, called
TNQVMVisitor
, that extendsAllGateVisitor
, but also provides aninitialize()
andfinalize()
method.Initializing the wavefunction tensor, and other init functionality, can go in initialize. In finalize(), I'd like to see ITensorMPSVisitor take its cbits from Measurements and add them to the AcceleratorBuffer so that users can call getMeasurements() and view the measurement results.
Then in execute() we'll wrap the InstructionIterator loop with
visitor->initialize()
andvisitor->finalize()
.I'd also like to see the
tnqvm/
directory restructured to haveTNQVM
,TNQVMBuffer
, andTNQVMVisitor
classes only, and subdirectoriesitensor
/ andexatensor/
that hold visitors specific to those types.