Aenigma Forums

  • 01. November 2024, 12:30:05 (12:30 PM)
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
*
Pages: [1]   Go Down

Author Topic: Coding for quantum computers  (Read 3526 times)

0 Members and 1 Guest are viewing this topic.

Dalden

  • EQ2 Guild Member
  • Hero Poster
  • ***
  • Offline Offline
  • Posts: 1047
  • Liked: 0
  • Lazy?
Coding for quantum computers
« on: 17. November 2008, 13:58:44 (01:58 PM) »

For the geeky...

Quantum Meta-Vax 9000: Runtime libraries, reference manual:


FUNCTION  fileExists

PROTOTYPE
             std::pair<std::complex<float>> fileExists (const char *path);

ARGUMENTS
             path - absolute or relative path to a file to test for existence.

RETURNS

             A pair of complex floats, both normalized in the range (-1.0 - +1.0, -1.0i - +1.0i)

                 pair.first - the fractional extent to which the file exists.

                 pair.second - the fractional extent to which the file does not exist.

             Each complex float represents a unit eigenvector in the Heisenberg

             phase-space of the file.

 BUGS

             Under conditions of parity violation, lepton number may not be preserved.

             May accidentally collapse the quantum vacuum into a lower metastable

             state and destroy the universe.  In this case, fileExists() will throw a

             UniverseNotFound exception.

USAGE

              std::pair<std::complex<float>> result;

              result = fileExists ("/etc/passwd");

              if ((pow (acos (imag (result.first) / real (result.first)), 2.0)

                 + pow (acos (imag (result.second) / real (result.second)), 2.0)

              >= 0.5)
             {

                  cout << "Wtf?" << endl;
             }
             else if ((pow (acos (real (result.first) / imag (result.first)), 2.0)

                 + pow (acos (real (result.second) / imag (result.second)), 2.0)
              < -0.5)

             {

                  cout << "File is at right angles to reality?" << endl;
             }

             else  [  .  .  .  ]


Logged
Pages: [1]   Go Up
 

ShoutBox!

GM(dront):
Nov. 10 2016 - 8:00pm
from Musik: i dont remember my log|pass so i write from dronts. he killed last Friday (2nd Nov).
if u want to talk 'bout it u can mail me to greenmusik dog gmail com
sorry for tell but i have to or i'll go crazy >__<
Epaphus:
Aug. 30 2016 - 12:01am
Anyone playing TLE?
Epaphus:
Aug. 30 2016 - 12:01am
Hello and Good bye  ;D
Arelu:
Aug. 04 2016 - 5:04pm
Arelu was here and then was gone!
Epaphus:
Dec. 28 2014 - 10:44pm
I am playing Elite: Dangerous at the moment, tried Landmark for a bit. Waiting for EQ3 now.
Welcome, Guest. Please login or register.
Did you miss your activation email?
01. November 2024, 12:30:05 (12:30 PM)

Login with username, password and session length

Recent

Page created in 0.054 seconds with 28 queries.