unitaryfund / qrack

Comprehensive, GPU accelerated framework for developing universal virtual quantum processors
https://qrack.readthedocs.io/en/latest/
GNU Lesser General Public License v3.0
172 stars 38 forks source link

QBdt improvements (#954) #959

Closed WrathfulSpatula closed 2 years ago

WrathfulSpatula commented 2 years ago

QBdt can almost correctly Attach() to QEngine types. In fact, gate primitive unit tests generally pass with "attached" qubits, except for mirror circuit integration tests.

In the meantime, QBdt has been significantly improved, by using a std::set to skip branching on gate depth node peers. QPager and QStabilizerHybrid also now provide preliminary for support for the QEngine polymorphism.

Finishing QBdt::Attach() support might take about a week or so, but everything besides that, herein, is unaffected or improved, including simple QBdt simulation.

WrathfulSpatula commented 2 years ago

There seems to be a basic problem with QBdt::Attach() phase handling, by the way. It's difficult to track the necessary overall phase factors as non-arbitrary, particularly with stabilizer, which doesn't necessarily track absolute phase to begin with. However, QHybrid also seems to work similarly as well, up to phase effects, when attached to QBdt.