Skip to content

Home

Warning

This is project under development. Until version 0.3 is released, this repository will be unstable. Previous versions of the language are deprecated and not fully functioning.

hhat hhat

UnitaryFoundation version

H-hat is a rule system, compiler framework, and a statically typed, functional and distributed-system inspired, hybrid quantum-classical programming language family.

Targeted at software developers. This ecosystem requires no prior knowledge on quantum physics. For quantum technologies to become widely available, they must interoperate with existing software, and must be easier for software developers to reason about the quantum paradigm without a PhD in quantum information or quantum computing. Most of the features are intuitive, both classical and quantum can exist in the same code, and the quantum side is as easy to code as in the classical one.

Ships with Heather dialect. A simple but reasonable programming language, Heather aims to demonstrate the capabilities of the H-hat ecosystem. Check it out at the hhat-heather crate.

State-of-the-art software concepts. Latest software paradigms and cutting-edge features are presented for both classical and quantum sides, enabling a seamless coding experience, with smart compilation. The features and capabilities H-hat aims to accomplish and delivery are briefly described at the paper "Toward Declarative Platform-Independent Modeling of Hybrid Quantum--Classical Software".

Building quantum open-source software. Not only quantum software should advance, but we believe open-source is the backbone of world's most important software applications and tools. We are proudly supported by UnitaryFoundation.

Key Features

H-hat rule system defines how each dialect should behave in specific contexts. Below some of those rules are presented:

  • Classical and quantum entities must be able to coexist in the same program.
  • Quantum paradigm is a first-class entity just as its classical counterpart. It possesses quantum types, literals, constants, variables and functions that are denoted by the @ prefix.
  • No quantum physics properties such as qubits, quantum states, gates, circuits, pulses, Hamiltonians, or measurements are exposed to the user as language constructs. They are handled internally by the compiler, keeping the dialects platform-independent and problem-domain oriented.
  • Quantum functions must be declarative in nature to keep the quantum model abstracted away from platform-specific definitions. Quantum low-level languages and target backends will define how each primitive quantum function is interpreted.
  • Quantum data is lazily evaluated and linear, requiring a cast operator to realize it, to consume it and to drop it.

Getting Started

  • Start: learn what is H-hat, why H-hat, and how to use H-hat
  • Rule system: learn how H-hat keeps code compliant
  • Heather: learn about Heather, the first H-hat dialect
  • Tutorials: check tutorials to get familiarized with Heather

License

MIT

Contributing

Read the CONTRIBUTING file for more information.

Code of Conduct

We coexist in the same world. So be nice to others as you expect others to be nice to you :)