Skip to content

Blueqat 0.4.2

Compare
Choose a tag to compare
@gyu-don gyu-don released this 26 Mar 12:00
· 177 commits to master since this release

Release Date

Mar. 26, 2021

Changes

U1/U2/U3/CU1/CU2/CU3 gates are deprecated and no longer working.

  • U1(θ) → RZ(θ)
  • U2(φ, λ) → U(π/2, φ, λ, -0.5 * (φ+λ))
  • U3(θ, φ, λ) → U(θ, φ, λ, -0.5 * (φ+λ))
  • CU1(θ) → CR(θ)
  • CU2(φ, λ) → CU(π/2, φ, λ, -0.5 * (φ+λ))
  • CU3(θ, φ, λ) → CU(θ, φ, λ, -0.5 * (φ+λ))

are alternative.

Enhancement

Add U/CU gate and SX/SXDG gate.

U(θ, φ, λ, γ = 0.0) =
e^iγ * array([
[cos(θ/2), -e^iλ sin(θ/2)],
[e^iφ sin(θ/2), e^i(φ+λ) cos(θ/2)]])

SX = array([[1 + 1j, 1 - 1j], [1 - 1j, 1 + 1j]])
SXDG = SX†

CU is controlled-U gate.

How To Install

Update:
Jupyter Notebook: !pip install -U blueqat
Shell: pip install -U blueqat

Install:
Jupyter Notebook: !pip install blueqat
Shell: pip install blueqat