Document feedback

Question document fragment

When a question document fragment contains a formula, it is displayed as a space.

Submission type
issue

It's a little complicated...

I'd like to ask someone.

Please select the submission type

Problem type
Specifications and Common Mistakes

- Specifications and Common Mistakes:

- Misspellings or punctuation mistakes,incorrect formulas, abnormal display.

- Incorrect links, empty cells, or wrong formats.

- Chinese characters in English context.

- Minor inconsistencies between the UI and descriptions.

- Low writing fluency that does not affect understanding.

- Incorrect version numbers, including software package names and version numbers on the UI.

Usability

- Usability:

- Incorrect or missing key steps.

- Missing main function descriptions, keyword explanation, necessary prerequisites, or precautions.

- Ambiguous descriptions, unclear reference, or contradictory context.

- Unclear logic, such as missing classifications, items, and steps.

Correctness

- Correctness:

- Technical principles, function descriptions, supported platforms, parameter types, or exceptions inconsistent with that of software implementation.

- Incorrect schematic or architecture diagrams.

- Incorrect commands or command parameters.

- Incorrect code.

- Commands inconsistent with the functions.

- Wrong screenshots.

- Sample code running error, or running results inconsistent with the expectation.

Risk Warnings

- Risk Warnings:

- Lack of risk warnings for operations that may damage the system or important data.

Content Compliance

- Content Compliance:

- Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions.

- Copyright infringement.

Please select the type of question

Problem description

Describe the bug so that we can quickly locate the problem.

mindquantum.core.gates

Gate module that provides different quantum gate.

Base Class

mindquantum.core.gates.BasicGate

BasicGate is the base class of all gates.

mindquantum.core.gates.NoneParameterGate

Base class for non-parametric gates.

mindquantum.core.gates.ParameterGate

Gate that is parameterized.

mindquantum.core.gates.QuantumGate

Base class for quantum gates.

mindquantum.core.gates.NoiseGate

Noise gate class.

Quantum Gate

API Name

Description

Math

mindquantum.core.gates.CNOTGate

Control-X gate.

No formula yet.

mindquantum.core.gates.FSim

FSim gate represent fermionic simulation gate.

FSim(θ,ϕ)=(10000cos(θ)isin(θ)00isin(θ)cos(θ)0000eiϕ)

mindquantum.core.gates.GlobalPhase

Global phase gate.

GlobalPhase=(exp(iθ)00exp(iθ))

mindquantum.core.gates.HGate

Hadamard gate.

H=12(1111)

mindquantum.core.gates.IGate

Identity gate.

I=(1001)

mindquantum.core.gates.ISWAPGate

ISWAP gate.

No formula yet.

mindquantum.core.gates.Measure

Measurement gate that measure quantum qubits.

No formula yet.

mindquantum.core.gates.PhaseShift

Phase shift gate.

PhaseShift=(100exp(iθ))

mindquantum.core.gates.Rn

Pauli rotate about a arbitrary axis in bloch sphere.

Rn(α,β,γ)=ei(ασx+βσy+γσz)/2=cos(f/2)Iisin(f/2)(ασx+βσy+γσz)/fwhere f=α2+β2+γ2

mindquantum.core.gates.RX

Rotation gate around x-axis.

RX=(cos(θ/2)isin(θ/2)isin(θ/2)cos(θ/2))

mindquantum.core.gates.Rxx

Rxx gate.

Rxx(θ)=exp(iθ2XX)=(cosθ200isinθ20cosθ2isinθ200isinθ2cosθ20isinθ200cosθ2)

mindquantum.core.gates.Rxy

Rxy gate.

Rxy(θ)=exp(iθ2YX)=(cosθ200sinθ20cosθ2sinθ200sinθ2cosθ20sinθ200cosθ2)

mindquantum.core.gates.Rxz

Rxz gate.

Rxz(θ)=exp(iθ2ZX)=(cosθ2isinθ200isinθ2cosθ20000cosθ2isinθ200isinθ2cosθ2)

mindquantum.core.gates.RY

Rotation gate around y-axis.

RY=(cos(θ/2)sin(θ/2)sin(θ/2)cos(θ/2))

mindquantum.core.gates.Ryy

Ryy gate.

Ryy(θ)=exp(iθ2YY)=(cosθ200isinθ20cosθ2isinθ200isinθ2cosθ20isinθ200cosθ2)

mindquantum.core.gates.Ryz

Ryz gate.

Ryz(θ)=exp(iθ2ZY)=(cosθ2sinθ200sinθ2cosθ20000cosθ2sinθ200sinθ2cosθ2)

mindquantum.core.gates.RZ

Rotation gate around z-axis.

RZ=(exp(iθ/2)00exp(iθ/2))

mindquantum.core.gates.Rzz

Rzz gate.

Rzz(θ)=exp(iθ2ZZ)=(eiθ20000eiθ20000eiθ20000eiθ2)

mindquantum.core.gates.RotPauliString

Arbitrary pauli string rotation.

U(θ)=eiθP/2,P=iσi,where σ{X,Y,Z}

mindquantum.core.gates.SGate

S gate.

S=(100i)

mindquantum.core.gates.SWAPGate

SWAP gate that swap two different qubits.

No formula yet.

mindquantum.core.gates.SWAPalpha

SWAP alpha gate.

SWAP(α)=(1000012(1+eiπα)12(1eiπα)0012(1eiπα)12(1+eiπα)00001)

mindquantum.core.gates.SXGate

Sqrt X (SX) gate.

SX=12(1+i1i1i1+i)

mindquantum.core.gates.TGate

T gate.

T=(100(1+i)/(2))

mindquantum.core.gates.U3

U3 gate represent arbitrary single qubit gate.

U3(θ,ϕ,λ)=(cos(θ/2)eiλsin(θ/2)eiϕsin(θ/2)ei(ϕ+λ)cos(θ/2))

mindquantum.core.gates.XGate

Pauli-X gate.

X=(0110)

mindquantum.core.gates.YGate

Pauli Y gate.

Y=(0ii0)

mindquantum.core.gates.ZGate

Pauli-Z gate.

Z=(1001)

mindquantum.core.gates.GroupedPauli

Multi qubit pauli string gate.

U=iσi,where σ{I,X,Y,Z}

mindquantum.core.gates.Givens

Givens rotation gate.

G(θ)=exp(iθ2(YXXY))=(10000cosθsinθ00sinθcosθ00001)

Functional Gate

mindquantum.core.gates.UnivMathGate

Universal math gate.

mindquantum.core.gates.gene_univ_parameterized_gate

Generate a customer parameterized gate based on the single parameter defined unitary matrix.

mindquantum.core.gates.BarrierGate

Barrier gate will separate two gate in two different layer.

pre-instantiated gate

The gates blow are the pre-instantiated quantum gates, which can be used directly as an instance of quantum gate.

pre-instantiated gate

gate

mindquantum.core.gates.CNOT

mindquantum.core.gates.CNOTGate

mindquantum.core.gates.I

mindquantum.core.gates.IGate

mindquantum.core.gates.ISWAP

mindquantum.core.gates.ISWAPGate

mindquantum.core.gates.H

mindquantum.core.gates.HGate

mindquantum.core.gates.S

mindquantum.core.gates.PhaseShift (numpy.pi/2)

mindquantum.core.gates.SWAP

mindquantum.core.gates.SWAPGate

mindquantum.core.gates.SX

mindquantum.core.gates.SXGate

mindquantum.core.gates.T

mindquantum.core.gates.PhaseShift (numpy.pi/4)

mindquantum.core.gates.X

mindquantum.core.gates.XGate

mindquantum.core.gates.Y

mindquantum.core.gates.YGate

mindquantum.core.gates.Z

mindquantum.core.gates.ZGate

Quantum Channel

API Name

Description

Math

mindquantum.core.gates.AmplitudeDampingChannel

Amplitude damping channel express error that qubit is affected by the energy dissipation.

ϵ(ρ)=E0ρE0+E1ρE1where E0=[1001γ], E1=[0γ00]

mindquantum.core.gates.BitFlipChannel

A bit flip channel.

ϵ(ρ)=(1P)ρ+PXρX

mindquantum.core.gates.BitPhaseFlipChannel

A bit&phase flip channel.

ϵ(ρ)=(1P)ρ+PYρY

mindquantum.core.gates.DepolarizingChannel

A depolarizing channel.

ϵ(ρ)=(1P)ρ+P/4(IρI+XρX+YρY+ZρZ)

mindquantum.core.gates.KrausChannel

A kraus channel.

ϵ(ρ)=k=0m1EkρEk

mindquantum.core.gates.PauliChannel

A pauli channel.

ϵ(ρ)=(1PxPyPz)ρ+PxXρX+PyYρY+PzZρZ

mindquantum.core.gates.GroupedPauliChannel

A group of pauli channels.

ϵ(ρ)=iϵpaulii(ρ)

mindquantum.core.gates.PhaseDampingChannel

A phase damping channel.

ϵ(ρ)=E0ρE0+E1ρE1where E0=[1001γ], E1=[000γ]

mindquantum.core.gates.PhaseFlipChannel

A phase flip channel.

ϵ(ρ)=(1P)ρ+PZρZ

mindquantum.core.gates.ThermalRelaxationChannel

Thermal relaxation channel.

ϵ(ρ)=tr1[Λ(ρTI)],Λ=(ϵT100ϵT201ϵT1000000ϵT2001)where ϵT1=eTg/T1,ϵT2=eTg/T2

Functional Class

mindquantum.core.gates.MeasureResult

Measurement result container.

mindquantum.core.gates.Power

Power operator on a non parameterized gate.