Skip to content

Conversation

@shun0923
Copy link
Collaborator

Summary

Add gridsynth_circuit function and speed up ODGP solver using an iterator.

Details

  • gridsynth_circuit returns the synthesized circuit representation.
  • ODGP solver now generates solutions dynamically via an iterator, reducing memory usage and improving performance.

@shun0923
Copy link
Collaborator Author

Fixes #1

Run example of pygridsynth with a test angle:

python -m pygridsynth 0.7853981633974483 1e-6 --dps 256 --verbose --time

Example output:

to_upright_set_pair: 0.006000041961669922 s
------------------
time of solve_TDGP: 16.315698623657227 ms
time of diophantine_dyadic: 7.107734680175781 ms
z=DOmega(ZOmega(-1112890, 68153, 213961, 431805), 41), w=DOmega(ZOmega(-542341, 567444, -260146, -199542), 41)
------------------
time of decompose_domega_unitary: 20.524978637695312 ms
total time: 50.9488582611084 ms
HTSHTHTHTHTHTHTHTHTHTHTHTSHTHTHTHTHTHTSHTHTSHTSHTSHTSHTHTHTSHTHTSHTSHTHTSHTHTSHTHTSHTSHTHTSHTHTHTHTSHTHTHTSHTSHTSHTSHTSHTSHTSHTHTHTSHTHTSHTHTHTHTHTHTSHTHTSTHTHTHTHTSHTHTSHTHTHTSHTSHTHTSHTHTSHTHTSHXSSSWWW

@shun0923 shun0923 merged commit 051c0e6 into main Aug 15, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants