I am trying to implement some quantum error correcting codes in Liquid (please correct the tag if need be), and I thought I'd start by reproducing the Steane7 class discussed in the User's Manual here starting on page 55 (page 56 of the pdf). I have a couple of questions about the provided code though.
- The overall structure of the file is unclear to me. The example starts out by defining "type Steane7". This is a class definition, so I assume all of the following code is indented under this? On page 58 (59), it makes a reference to going back to the class definition to add the overrides, which makes it seem like the above code is not indented under the type. I assume this is meant to me that it's indented under the type but not under the synd method?
- In the previous mentioned overrides on page 58 (59), what is s and where does it come from? In F#, one can use words other than "this" and "self". Is that what s is supposed to be here, or is s referring to a value previously defined but not mentioned?
- The drawing instructions in the prep gate on page 56 (57) say "Error! Hyperlink reference not valid." What are the proper drawing instructions here? I'm guessing that's supposed to read "\multigate{#%d}{%s}"?
- The method "fix" has an else with no if on page 58. What's the proper reference to the parent here?
- Are there any pieces of the Steane7 class missing from the User Manual? If I call this in a script, it's going to work exactly like the compiled version of the code?
- For future codes I implement, are there any other methods which should be overridden? I am piecing together the QECC class by inspecting the compiled assembly through VS.
Frankly, all of these questions could be answered by someone simply pointing me to the source code for QECC and Steane7. The "source" folder I grabbed from the GitHub only has precompiled executables.