Main Content

Quantum Computing

Gate-based quantum computing algorithms

The MATLAB® Support Package for Quantum Computing enables you to prototype gate-based quantum algorithms. You can assemble quantum gates into a quantum circuit, simulate circuits on your local computer, and run circuits on remote hardware using Amazon® Web Services (AWS®).

To install the MATLAB Support Package for Quantum Computing, locate the add-on in Add-On Explorer using the instructions in Get and Manage Add-Ons.


quantumCircuitQuantum computing circuit
quantum.gate.SimpleGateSimple gate for quantum computing
quantum.gate.CompositeGateComposite gate for quantum computing
quantum.gate.QuantumStateState of qubits in quantum circuit
quantum.gate.QuantumMeasurementMeasurement result of quantum circuit
quantum.backend.QuantumDeviceAWSQuantum device available through AWS
quantum.backend.QuantumTaskAWSTask sent to AWS for execution on quantum device


expand all

Gates on One Target Qubit

hGateHadamard gate
idGateIdentity gate
xGatePauli X gate
yGatePauli Y gate
zGatePauli Z gate

Rotation Gates

rxGatex-axis rotation gate
ryGatey-axis rotation gate
rzGatez-axis rotation gate
r1Gatez-axis rotation gate with global phase
sGateS gate
siGateInverse S gate
tGateT gate
tiGateInverse T gate

Gates with One Control Qubit and One Target Qubit

chGateControlled Hadamard gate
cnotGateCNOT gate (controlled X gate)
cxGateControlled X gate (CNOT gate)
cyGateControlled Y gate
czGateControlled Z gate

Gates That Swap States of Two Qubits

swapGateSwap gate

Controlled Rotation Gates

crxGateControlled x-axis rotation gate
cryGateControlled y-axis rotation gate
crzGateControlled z-axis rotation gate
cr1GateControlled z-axis rotation gate with global phase

Controlled Controlled X Gate

ccxGateControlled controlled X gate (CCNOT or Toffoli gate)

Ising Coupling Gates

rxxGateIsing XX coupling gate
ryyGateIsing YY coupling gate
rzzGateIsing ZZ coupling gate

Composite and Specialized Gates

compositeGateConstruct composite gate for quantum computing
qftGateQuantum Fourier transform gate
mcxGateMulti-controlled X gate