Dirac is a programming language that contains all the math required in Quantum Physics. Using Paul Dirac's bra-ket notation, it is possible to simulate some Quantum calculations and by the use of random variables and vectors through pseudo random processes, to simulate very roughly, the uncertainty required in a physical systems.
Object: Create a quantum computing based language that uses randomness and probabilistic methods to supply the lack of adequate hardware. I don't live in a lab.
Motivation: Due to the crescent monopoly over compilers I decided to create my language to supply my own needs. I don't know if someone has the same.
Some properties of Dirac:
a. Dirac is a stack based randomized language similar to Forth.
b. Dirac is a compiled language.
c. Dirac is GPL licensed
d. Dirac uses bra-kets |0> |1>
I decided to be very rigorous about syntax. I know it is quite boring and counter- productive to program in such conditions However, I intend to be more precise, even including irrational numbers. How? You'll see! The fact is that mathematicians do not care about production, but aim always for clarity of thought. I see many languages that are quite easy to type, but in the end they are ambiguous when we have many ways of doing something instead of one.
The code goes like this:
program, teste.
variable, a is bra.
variable, x is matrix.
transpose(a).
c := mult(a,x).
print(c).
end, program.
Well, I have many notes about the Dirac language, and I have to study a bit more. But, for the following month I expect to present a compiler's prototype. Something very humble to start. In pseudo language I'd like to do this
1. Define a program
2. Define the variables bra-ket
3. At least one operator
!This is a comment
program teste
ket a,b,c
number x,y
c := ax+by
print c
end program