Response to Referees

Words from referees are in black; the responses are in blue.

Review of Shiu Lius Project for Physics 231 (C++)

Hubbard Spin Models
( Although the name of the operator is Hubbard operator, the subject is not Hubbard Spin Model. It is the operator itself. Hubbard operator can be applied on different models, not necessary to be Hubbard Model. )

12/1/03

First Review

Introduction:

This review has been organized into sections the following sections:
documentation, code, and implementation. The documentation section will describe the readability and accessibility of the documentation as it relates to the authors code. Similarly, the code and implementation sections will be oriented towards code, the usefulness of the code, and the stylistic interpretation of the reviewer.

Documentation:
General download and compilation documentation was absent.
( Added in "Download Program Files" )

 

The program function goals were ill defined for an individual unfamiliar with the Hubbard spin representation. For example what is the second quantized operator and how is it related to the authors code?
( Added in "Rehearsal" )

 

What model, algorithm, or implementation is the authors code best suited?
( I said in the introduction, or else places...... )

 

Furthermore, there was no *.pdf or *.txt file for downloadable reference (i.e. the paperless office in a park with a lab top).
( Can *.html file work? )

 

In general, the code related documentation was relatively unorganized. Although links to the code or pieces there of followed no easily accessible flow, the author did seem to explain the flow structure of the code. The author used the auto-create documentation package <italic>doxygen</italic>. The web page containing the documentation was at best only useful to a computer scientist, developer, or collaborator (with whom the author wrote the code).
( An overall explanation of code is added in "Grand Finale"  )

 

Syntactically, the documentation described codes function, but  lacked when describing why the author choose to write the code in which he did. For example constructor or operator overloading was a description in place of Hubbard spin initialization for a specific representation.
( I don't know how to explain this, because I don't think they are in a specific representation. )

 

Similarly, in the function main(), no explanation of purpose or method was described.
( Added in "main.cpp" )

 

 
Code and Implementation:

The code was well written appeared well written, except for a few stylistic nuances. The enumeration for some state | p > was a good way to avoid non state arguments, but lacked the flexibility of being able to use down instead of Down or simply d or D for Down.
( Explained in "Grand Finale" )

 

The reviewer also found a potential error. The state Xop(1, Up, Up) was allowed by the code, but it is not clear if this is a real state or not.
( Xop is an operator, Not a state )

 

It is also unclear why XProd objects need to be defined to do multiplication and similarly for other operations.
( Explained in "Grand Finale" )

 

Conversion between Hubbard and Fermion representation (if defined) is not obvious. For example, The commutator of spin operators S+ is output as a Hubbard operator. From the lack of documentation, the purpose of similar code is not evident.
( The transformation relation had been put on the web. It is not difficult to convert them back from Hubbard operators. Please compare the two examples in "Performance", and look up the convertion in Spin Operator -> Hubbard Operator. )

 

Implementing the code methods for calculations is only accessible via recompilation.
A simple while loop enclosing user input would simplify this greatly.
( Explained in "Grand Finale". The project is designed as part of users program code. It is not really a Mathematica or Maple type thing, although it can be done that way. )

 

In general though, the code was well written with significant operator overloading and class organization.

 


Conclusion:

The major flaw of the project was a general lack of documentation. With better documentation, the code could be more accessible to other users. Implementation should also not require recompilation of existing code.
( Documentations are added in both "Introduction", and "Download Program Files". )


Back to Main