GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • reportCompMatr1()
  • createCompMatr()
  • C
  • C++

This view

  • Original page
  • New address

GeezerVison is showing quest-kit.github.io โ€” The Quantum Exact Simulation Toolkit: Getters

Logo
The Quantum Exact Simulation Toolkit v4.3.0
Loading...
Searching...
No Matches
Functions
Getters
๐Ÿ“‹ API ยป Matrices

Functions for obtaining fixed-size matrices. More...

Functions

static CompMatr1 getCompMatr1 (qcomp **in)
 
static CompMatr1 getCompMatr1 (qcomp in[2][2])
 
static CompMatr2 getCompMatr2 (qcomp **in)
 
static CompMatr2 getCompMatr2 (qcomp in[4][4])
 
static DiagMatr1 getDiagMatr1 (qcomp *in)
 
static DiagMatr2 getDiagMatr2 (qcomp *in)
 
CompMatr1 getInlineCompMatr1 ({{ matrix }})
 
CompMatr2 getInlineCompMatr2 ({{ matrix }})
 
DiagMatr1 getInlineDiagMatr1 ({ list })
 
DiagMatr2 getInlineDiagMatr2 ({ list })
 

Detailed Description

Functions for obtaining fixed-size matrices.

Function Documentation

โ—† getCompMatr1() [1/2]

static CompMatr1 getCompMatr1 ( qcomp ** in)
inlinestatic
Note
Documentation for this function or struct is under construction!
See also
  • reportCompMatr1()
  • getInlineCompMatr2()
  • getDiagMatr1()
  • getCompMatr2()
  • createCompMatr()
  • C and C++ examples

Definition at line 811 of file matrices.h.

811 {
812 _validateNewNestedElemsPtrNotNull(in, 1, __func__);
813
814 CompMatr1 out;
815
816 out.numQubits = 1;
817 out.numRows = 2;
818 for (int r=0; r<2; r++)
819 for (int c=0; c<2; c++)
820 out.elems[r][c] = in[r][c];
821
822 return out;
823}
CompMatr1
Definition matrices.h:85
CompMatr1::numRows
qindex numRows
Definition matrices.h:93
CompMatr1::elems
qcomp elems[2][2]
Definition matrices.h:97
CompMatr1::numQubits
int numQubits
Definition matrices.h:89

Referenced by applyMultiStateControlledHadamard(), applyMultiStateControlledRotateAroundAxis(), TEST_CASE(), and TEST_CASE().

โ—† getCompMatr1() [2/2]

static CompMatr1 getCompMatr1 ( qcomp in[2][2])
inlinestatic
Note
Documentation for this function or struct is under construction!

Definition at line 950 of file matrices.h.

950{ return _getCompMatr1FromArr(in); }

โ—† getCompMatr2() [1/2]

static CompMatr2 getCompMatr2 ( qcomp ** in)
inlinestatic
Note
Documentation for this function or struct is under construction!
See also
  • reportCompMatr2()
  • getInlineCompMatr2()
  • getDiagMatr2()
  • createCompMatr()
  • C and C++ examples

Definition at line 837 of file matrices.h.

837 {
838 _validateNewNestedElemsPtrNotNull(in, 2, __func__);
839
840 CompMatr2 out;
841
842 out.numQubits = 2;
843 out.numRows = 4;
844 for (int r=0; r<4; r++)
845 for (int c=0; c<4; c++)
846 out.elems[r][c] = in[r][c];
847
848 return out;
849}
CompMatr2
Definition matrices.h:120
CompMatr2::numQubits
int numQubits
Definition matrices.h:124
CompMatr2::elems
qcomp elems[4][4]
Definition matrices.h:132
CompMatr2::numRows
qindex numRows
Definition matrices.h:128

Referenced by applyMultiStateControlledSqrtSwap().

โ—† getCompMatr2() [2/2]

static CompMatr2 getCompMatr2 ( qcomp in[4][4])
inlinestatic
Note
Documentation for this function or struct is under construction!

Definition at line 955 of file matrices.h.

955{ return _getCompMatr2FromArr(in); }

โ—† getDiagMatr1()

static DiagMatr1 getDiagMatr1 ( qcomp * in)
inlinestatic
Note
Documentation for this function or struct is under construction!
See also
  • reportDiagMatr1()
  • getInlineDiagMatr1()
  • getCompMatr1()
  • getDiagMatr2()
  • createDiagMatr()
  • C and C++ examples

Definition at line 864 of file matrices.h.

864 {
865 _validateNewElemsPtrNotNull(in, __func__);
866
867 DiagMatr1 out;
868
869 out.numQubits = 1;
870 out.numElems = 2;
871 for (int i=0; i<2; i++)
872 out.elems[i] = in[i];
873
874 return out;
875}
DiagMatr1
Definition matrices.h:323
DiagMatr1::numQubits
int numQubits
Definition matrices.h:327
DiagMatr1::elems
qcomp elems[2]
Definition matrices.h:336
DiagMatr1::numElems
qindex numElems
Definition matrices.h:331

Referenced by applyMultiQubitPhaseFlip(), applyMultiQubitPhaseShift(), applyMultiStateControlledS(), and applyMultiStateControlledT().

โ—† getDiagMatr2()

static DiagMatr2 getDiagMatr2 ( qcomp * in)
inlinestatic
Note
Documentation for this function or struct is under construction!
See also
  • reportDiagMatr2()
  • getInlineDiagMatr2()
  • getCompMatr2()
  • createDiagMatr()
  • C and C++ examples

Definition at line 889 of file matrices.h.

889 {
890 _validateNewElemsPtrNotNull(in, __func__);
891
892 DiagMatr2 out;
893
894 out.numQubits = 2;
895 out.numElems = 4;
896 for (int i=0; i<4; i++)
897 out.elems[i] = in[i];
898
899 return out;
900}
DiagMatr2
Definition matrices.h:359
DiagMatr2::elems
qcomp elems[4]
Definition matrices.h:372
DiagMatr2::numQubits
int numQubits
Definition matrices.h:363
DiagMatr2::numElems
qindex numElems
Definition matrices.h:367

โ—† getInlineCompMatr1()

CompMatr1 getInlineCompMatr1 ( {{ matrix }} )
Note
Documentation for this function or struct is under construction!
This entity is actually a macro.
See also
  • reportCompMatr1()
  • getInlineDiagMatr1()
  • getInlineCompMatr2()
  • createCompMatr()
  • C and C++ examples

โ—† getInlineCompMatr2()

CompMatr2 getInlineCompMatr2 ( {{ matrix }} )
Note
Documentation for this function or struct is under construction!
This entity is actually a macro.
See also
  • reportCompMatr2()
  • getInlineDiagMatr2()
  • createCompMatr()
  • C and C++ examples

โ—† getInlineDiagMatr1()

DiagMatr1 getInlineDiagMatr1 ( { list } )
Note
Documentation for this function or struct is under construction!
This entity is actually a macro.
See also
  • reportDiagMatr1()
  • getInlineCompMatr1()
  • getInlineDiagMatr2()
  • createDiagMatr()
  • C and C++ examples

โ—† getInlineDiagMatr2()

DiagMatr2 getInlineDiagMatr2 ( { list } )
Note
Documentation for this function or struct is under construction!
This entity is actually a macro.
See also
  • reportDiagMatr2()
  • getInlineCompMatr2()
  • createDiagMatr()
  • C and C++ examples
  • Generated by doxygen 1.12.0
You are visitor 01402809 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.