Blueqat 0.3.12
Release Date: 20 Jan. 2020
New features
Circuit repr
Circuit.__repr__
method is implemented.
Now, Circuit
is printable.
c = Circuit().x[0].rz(1.2)[1]
c.cx[0, 1]
print(c)
# => Circuit(2).x[0].rz(1.2)[1].cx[0, 1]
Modifications
Adjust global phase
These are Blueqat standard implementation of global phase.
RZ and U1 gate:
[e^-iθ/2, 0],
[0, e^iθ/2]
Phase gate (, S gate [θ=π/2], S† gate [θ=-π/2], T gate [θ=π/4], T† gate [θ=-π/4]):
[1, 0],
[0, e^iθ]
U3 gate (, U2 gate [θ=π/2] ):
[e^-i(φ+λ)/2 cos θ/2, -e^-i(φ-λ)/2 sin θ/2],
[e^i(φ-λ)/2 sin θ/2, e^i(φ+λ)/2 cos θ/2]
CRZ gate:
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, e^-iθ/2, 0],
[0, 0, 0, e^iθ/2]
CPhase, CU1 gate:
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, e^iθ]
CU3 gate (, CU2 gate [θ=π/2] ):
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, e^-i(φ+λ)/2 cos θ/2, -e^-i(φ-λ)/2 sin θ/2],
[0, 0, e^i(φ-λ)/2 sin θ/2, e^i(φ+λ)/2 cos θ/2]
Note that the phase of U1 and CU1 are not corresponded.
This is due to OpenQASM's qelib1.inc implementations.
We recommend to use RZ/CRZ and PHASE/CPHASE instead of U1/CU1 gate if the circuit is not ported from Qiskit/OpenQASM.
Bug Fix
numba backend
Correct bugs in controlled gate of numba backend
Install
New install
pip install blueqat
Update
pip install -U blueqat