Veriqc / TDD_C

1 stars 1 forks source link

Refactor Code and Implement Python-to-C Conversion #6

Open gcc-bug opened 10 months ago

gcc-bug commented 10 months ago

Task: Code Refactoring and Python-to-C Conversion

Clean the Code

Build Python to C

gcc-bug commented 9 months ago

To convert Python code into C code, it is necessary to utilize the 'pybind' library along with 'xtensor-python'

gcc-bug commented 9 months ago

Convert Python code to C++ using pybid. Focus on exposing the following special types in C++:

gcc-bug commented 9 months ago

Next Stage Task Description:

Current Issue

Plan for Next Week

  1. Investigate the Bug

    • Utilize a structured approach with try, except, and logging (cout) to locate the bug.
    • Fix the bug once identified.
  2. Contingency Plan

    • If unable to locate or fix the bug, consider rewriting the 'draw' function in Python as an alternative solution.
  3. Finalization and Release

    • Post bug resolution, finalize the 'draw' function and prepare it for release.
    • Target Completion Date: 11.30
gcc-bug commented 9 months ago

I've implemented an export2Dot function in tensor.to_tdd. This method currently serves as a basic approach to utilize the draw function, though it is somewhat rudimentary. However, it effectively ensures the functionality of the code.

Additionally, I've identified a bug related to memory management. This issue seems to be linked with ComplexTable<>::Entry, a complex struct in C++. Addressing this bug will require further work, specifically in exposing and effectively utilizing this struct to improve the draw function.

gcc-bug commented 9 months ago

I have successfully implemented the functionality to convert multiple tensors to a TDD in one DD package. However, I have encountering a new bug: a segmentation fault occurs when using tensornetwork.cont() with multiple tensors.

Work Plan for This Week:

  1. Bug Investigation and Resolution: Focus on identifying and resolving the segmentation fault issue.
    • Roll back the Git repository to identify the changes that introduced the bug.
    • Analyze the modifications and implement a fix for the segmentation fault issue.
  2. Experimentation: Conduct further tests and experiments to ensure stability.
  3. PYPI Release Preparation: Aim to release a new version on PYPI after ensuring the bug is fixed and the functionality is stable.
gcc-bug commented 7 months ago

Completed Task

Next Steps

  1. Linux Version: Release a Linux-compatible version, adhering to the procedures outlined in the AuditWheel repository.
  2. Research: Study how to configure Docker for this project.