Gate - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


QuantumComputing

  

Gate

  

return a quantum gate

Calling Sequence
Parameters
Description

Examples
   

Calling Sequence

Gate(gatestr, options)
Gate()

Parameters

gatestr

-

string; symbol of the quantum gate

options

-

name or algebraic; if the gate depends on angles, then any of the three angles, lambda, phi, and theta, can be set as optional keyword parameters; they can be set to any algebraic expression including integers, rational and irrational numbers, constants like Pi, symbols, and polynomials.

Description

• 

The Gate command converts a string symbol of the quantum gate into a Matrix representation of the gate.

• 

The Gate command without arguments yields a list of the known gates.

Examples

First we load the QuantumChemistry package

withQuantumChemistry:

Next we load the QuantumComputing subpackage

withQuantumComputing;

ConvertDirac,Gate,InitialState,MeasureState,PrepareState,QubitPopulations,QubitPopulationsPlot

(1)

Now Maple knows the standard 1- and 2-qubit gates.  For example, Pauli Z gate  

Uz  GateZ;

Uz100−1

(2)

or the Pauli X and Y gates

Uz,Uy  GateX,GateY;

 

Uz,Uy0110,0−II0

(3)

or the most general 1-qubit gate, known as the U (universal) gate that depends on 3 angles that we keep symbolic

Uu  GateU,theta=theta,phi=phi,lambda=lambda;

 

Uucosθ2ⅇIλsinθ2ⅇIφsinθ2ⅇIφ+λcosθ2

(4)

or a 2-qubit gate like the CNOT gate

Ucnot  GateCNOT;

Ucnot1000000100100100

(5)

All known gates can be returned by calling the command without arguments

Gate;

CH,CNOT,CP,CPhase,CS,CT,CU,CX,CY,CZ,H,I,P,Rx,Ry,Rz,S,SWAP,T,U,X,Y,Z,fSWAP,iSWAP

(6)

 

See Also

QuantumChemistry
QuantumComputing