Click here to Skip to main content
15,919,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Hiding tab control for CPropertySheet Pin
Victor Nijegorodov15-Nov-17 5:30
Victor Nijegorodov15-Nov-17 5:30 
GeneralRe: Hiding tab control for CPropertySheet Pin
Joe Woodbury15-Nov-17 7:14
professionalJoe Woodbury15-Nov-17 7:14 
GeneralRe: Hiding tab control for CPropertySheet Pin
Victor Nijegorodov15-Nov-17 10:13
Victor Nijegorodov15-Nov-17 10:13 
QuestionDumping Derived CStatic Object Pin
ForNow9-Nov-17 13:02
ForNow9-Nov-17 13:02 
QuestionRe: Dumping Derived CStatic Object Pin
David Crow9-Nov-17 16:13
David Crow9-Nov-17 16:13 
AnswerRe: Dumping Derived CStatic Object Pin
ForNow10-Nov-17 3:04
ForNow10-Nov-17 3:04 
GeneralRe: Dumping Derived CStatic Object Pin
leon de boer12-Nov-17 6:00
leon de boer12-Nov-17 6:00 
QuestionQuantum Computing sim ? Pin
bluatigro7-Nov-17 22:42
bluatigro7-Nov-17 22:42 
this is verry interesting :
Quote:
https://quantumexperience.ng.bluemix.net/qx/experience

i tryed to get it in c++
its a start
i been programming clasical computers for +-30 year's
i not even shure i wil understad this [ if ever ]
// bluatigro 8 nov 2017
// QC sim
// see :
// https://quantumexperience.ng.bluemix.net/qx/experience

#include <iostream>
#include <string>
#include <math.h>


void rot( double & k , double & l , double r)
{
    double s , c , hk , hl ;
    s = sin( r ) ;
    c = cos( r ) ;
    hk = k * c - l * s ;
    hl = k * s + l * c ;
    k = hk ;
    l = hl ;
}
const double PI = atn( 1.0 ) * 4.0 ;

class Qbit
{
public :
    double x , y , z ;
    Qbit() // |0>
    {
        x = 0.0 ;
        y = 0.0 ;
        z = 1.0 ;
    }
    Qbit( double a , double b , double c )
    {
        x = a ;
        y = b ;
        z = c ;
    }
    void X()
    {
        rot( y , z , PI ) ;
    }
    void Y()
    {
        rot( x , z , PI ) ;
    }
    void Z()
    {
        rot( x , y , PI ) ;
    }
    void H() // |+>
    {
        ;
    }
    void S()
    {
        rot( x , y , PI / 2 ) ;
    }
    void S1()
    {
        rot( x , y , -PI / 2 ) ;
    }
    void T()
    {
        rot( x , y , PI / 4 ) ;
    }
    void T1()
    {
        rot( x , y , -PI / 4 ) ;
    }
    double get_state()
    {
        return z < 0.0 ? 1.0 : 0.0 ;
    }
} ;
void cnot( Qbit & control , Qbit & target )
{
    if ( control.get_state() == 1.0 )
        target.z = 1.0 - target.z ;
}

using namespace std ;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}

AnswerRe: Quantum Computing sim ? Pin
CPallini7-Nov-17 22:58
mveCPallini7-Nov-17 22:58 
QuestionRe: Quantum Computing sim ? Pin
David Crow8-Nov-17 3:43
David Crow8-Nov-17 3:43 
AnswerRe: Quantum Computing sim ? Pin
bluatigro13-Nov-17 22:07
bluatigro13-Nov-17 22:07 
QuestionMessage Closed Pin
7-Nov-17 0:09
Munchies_Matt7-Nov-17 0:09 
AnswerRe: Anyone noticed that... Pin
Richard MacCutchan7-Nov-17 0:28
mveRichard MacCutchan7-Nov-17 0:28 
PraiseRe: Anyone noticed that... Pin
CPallini7-Nov-17 0:37
mveCPallini7-Nov-17 0:37 
GeneralRe: Anyone noticed that... Pin
Richard MacCutchan7-Nov-17 1:10
mveRichard MacCutchan7-Nov-17 1:10 
GeneralRe: Anyone noticed that... Pin
CPallini7-Nov-17 2:55
mveCPallini7-Nov-17 2:55 
Questioncreate a dpi-aware application Pin
Theo Buys6-Nov-17 23:19
Theo Buys6-Nov-17 23:19 
AnswerRe: create a dpi-aware application Pin
Richard MacCutchan7-Nov-17 0:24
mveRichard MacCutchan7-Nov-17 0:24 
GeneralRe: create a dpi-aware application Pin
Theo Buys7-Nov-17 0:54
Theo Buys7-Nov-17 0:54 
GeneralRe: create a dpi-aware application Pin
Richard MacCutchan7-Nov-17 1:09
mveRichard MacCutchan7-Nov-17 1:09 
GeneralRe: create a dpi-aware application Pin
Theo Buys7-Nov-17 1:37
Theo Buys7-Nov-17 1:37 
GeneralRe: create a dpi-aware application Pin
Richard MacCutchan7-Nov-17 1:50
mveRichard MacCutchan7-Nov-17 1:50 
GeneralRe: create a dpi-aware application Pin
Theo Buys7-Nov-17 2:09
Theo Buys7-Nov-17 2:09 
GeneralRe: create a dpi-aware application Pin
Richard MacCutchan7-Nov-17 3:27
mveRichard MacCutchan7-Nov-17 3:27 
AnswerRe: create a dpi-aware application Pin
Gisle Vanem7-Nov-17 19:35
Gisle Vanem7-Nov-17 19:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.