Package: hhat-lang
H-hat$\hat{H}$ (H-hat) is a high abstraction quantum programming language.Disclaimer: This is a work still in early stages and may be seeing as such. So errors, inconsistencies, tons of experimentation, modifications and trials will happen.Note: Documentation is in progress and can be foundhere.ContentsSummaryObjectivesFeaturesInstallationExecuting CodeProgressGot an error?LicenseCreditsSummaryA (high level) quantum algorithms builderHandling output quantum data with contextualized meaningQuantum and classical variables are arrays of dataNo qubit approach: it will be handled by the language as operations (quantum) on indexes; The interpreter/compiler will be responsible to transpile it to low level QASM instructionsConvert high level languages commands and procedures into low level quantum instructions for quantum languages such as openQASM, cQASM, NetQASM, Q1ASM to be executed on their respective hardware/simulatorDebugging results and quantum processes through post-measurement analysis (probably)ObjectivesProvide an intermediate picture between classical high-level and QASM (orQIR)-like programming languagesMake use of basic and complex quantum instructions and procedures in a qubit-free environmentBring light to measurement results and their analysisBe simples enough to be used by software developers with little knowledge on quantum computingPrepare the path for quantum devices with hundreds or thousands of qubitsIntegrate with common programming languages through function callsIntegrate with quantum hardware and compilersDebugging through (partial) quantum analysis of measurement results for results and inner processes comparing them to simulated ones (using fisher information, linear entropy, entanglement measurements, etc)Featuressimple syntaxarray-like programming approachquantum functions for quantum dataquantum commands and quantum data are referred with@before the word, i.e.@init,@sync,@q1measurements automatically made after executing quantum variable content through interaction with classical functions and classical datameasurement result contextualized according to the data type it is interacting withInstallationInstallPython 3.10+.Set up a virtual environment, such asanacondaorvenv.Install the package, viaPYPI(instructionsbelow) or indevelopment mode.Setting up a virtual environmentIn case you don't know how to set up a virtual environment, see the examples below (choose only one):Using condaInstallanaconda.Create an environment forh-hatand activate it:conda activate <name_of_the_env>Using venvCreate a venv:python3.10 -m venv .venv(the venv will be located in the folder.venvinside the hhat_lang root folder)Deactivate any other environment you might have active, i.e. conda:conda deactivate, until you have no environmentActivate our new venv through:source .venv/bin/activatePYPI installationAfter setting up your virtual environment, simply use:python3-mpipinstallhhat-langDevelopment modeIn the root folder, run:python3-mpipinstall-e.Executing CodeAfter proceeding on your preferred installation method, it's time to run some code. Just typehhatin the terminal followed by the file containing your code (.hatextension).ProgressYou can follow the progress in theTODOs list.Got an error?Open an issue!LicenseMITCreditsCode is being developed byDoomsk. The author thanksKaonan,T1t0,Anneriet,PenguimandLucasczpnkfor great discussions and help on developing the first language concepts.