forked from tensorflow/quantum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mps 1d Sample / SampledExpectation ops (tensorflow#654)
* initial commit * Fix simulate_mps_test * Add CheckQubitsIn1D * Add Eigen & QSim MPS * Add mps_1d op and its test * Mike's feedback - add bond_dim as attr * Add Attr and its tests * Rename to mps_1d_expectation * Fix lint and format * Add import_test * Fix wheel test - add mps into release/BUILD * Mike's feedback * WIP where Segmentation fault happens? * Add Mike's feedback - no gate with control_qubit is allowed * Revert control_qubit gate validation. Both Operation with natural born controlled gate (e.g. CNOT) and synthesized ControlledOperation are converted into the same tfq_gate_set with control_qubit. So, we can't filter ControlledOperation in this way, revert the previous commit. * Fix program_resolution_test * Fix CheckQubitsIn1D() * Add print messages * Add debug print * Bump up to qsim==0.10.2 * Remove tfq::QsimFor and util_qsim.h::ComputeExpectationMPS * Add ComputeExpectationMPSQsim in util_qsim.h * Add more detailed debug prints * Bump up bond_dim from 2 (default) to 4 to fix segfault error. * Fix how to use ApplyGate in ComputeExpectationMPSQsim * Uncomment ComputeSmall() and Remove debug outputs * Fix format * Mike's feedback 1 : use fuses circuit and ApplyFusedGate() * Mike's feedback 2 : set default bond_dim to 4 * Fix format * First commit for mps_1d_samples and mps_1d_sampled_expectation * Update the latest qsim's MPS Sample() * Fix format * Fix minor errors * put things in a working state. Co-authored-by: Michael Broughton <[email protected]>
- Loading branch information
1 parent
864f9ce
commit 8cda8f0
Showing
9 changed files
with
1,414 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.