GitPedia
blueqat

blueqat/blueqatSDK

Quantum Computer Library for Everyone

29 Releases
Latest: 3y ago
blueqat 2.0.4 - 2023-04-022.0.4Latest
minatoyuichirominatoyuichiro·3y ago·April 2, 2023
GitHub

New cuQuantum Backend both on cuStateVec and cuTensorNet

  • limited gate support with cusv and cutn backend.
blueqat 2.0.0 - 2022-05-222.0.0
minatoyuichirominatoyuichiro·4y ago·May 22, 2022
GitHub

New default backend based on Tensor Network

  • The back end has been changed to the tensor network. The previous backend environment can still be used with .run(backend="numpy").

New QAOA function

  • QAOA function is changed to the tensornetwork based.
blueqat 1.0.4 - 2022-05-14 1.0.4
minatoyuichirominatoyuichiro·4y ago·May 14, 2022
GitHub

bug fixed on qaoa

blueqat 1.0.3 - 2022-05-141.0.3
minatoyuichirominatoyuichiro·4y ago·May 14, 2022
GitHub

# QAOA with Tensornetwork ``` from blueqat.utils import qaoa from blueqat import Circuit from blueqat.pauli import qubo_bit as q from blueqat.pauli import X,Y,Z,I hamiltonian = (15-(1+2*q(0)+4*q(1))*(1+2*q(2)))**2 step = 1 init = Circuit().h[0].cx[0,1].x[0] mixer = (X[0]*X[1]+Y[0]*Y[1])*0.5 result = qaoa(hamiltonian, step, init, mixer) result.circuit.run(backend="quimb", shots=1000) ```

blueqat 1.0.2 - 2022-05-141.0.2
minatoyuichirominatoyuichiro·4y ago·May 14, 2022
GitHub

Bug fixed

blueqat 1.0.0 - 2022-05-061.0.0
minatoyuichirominatoyuichiro·4y ago·May 6, 2022
GitHub

📦 Get the single amplitude

  • ```python
  • Circuit(4).h[:].run(backend="quimb", amplitude="0101")
  • ```

📦 Get the sample

  • ```python
  • Circuit(4).h[:].run(backend="quimb", shots=100)
  • ```

📦 Get the expectation value of hamiltonian

  • ```python
  • from blueqat.pauli import Z
  • hamiltonian = 1*Z[0]+1*Z[1]
  • Circuit(4).x[:].run(backend="quimb", hamiltonian=hamiltonian)
  • ```
blueqat 0.6.0 - 2022-04-180.6.0
minatoyuichirominatoyuichiro·4y ago·April 18, 2022
GitHub

# Photonics Continuous Variable Programming Integrated ```python from blueqat import photonqat as pq import numpy as np import matplotlib.pyplot as plt # mode number = 2, cutoff dimension = 15 F = pq.Fock(2, cutoff = 15) alpha = (1 + 1j) r = -0.5 F.D(0, alpha) # Displacement to mode 0 F.S(1, r) # Squeezeng to mode 1 F.run() # Plot Wigner fucntion for mode 0 using matplotlib (x, p, W) = F.Wigner(0, plot = 'y', xrange = 5.0, prange = 5.0) ```

blueqat 0.5.0 - 2022-04-170.5.0
minatoyuichirominatoyuichiro·4y ago·April 17, 2022
GitHub

📋 Changes

  • Circuit drawing function with networkx
blueqat 0.4.9 - 2022-02-080.4.9
gyu-dongyu-don·4y ago·February 8, 2022
GitHub

📋 Changes

  • Correct `TGate.matrix()`, `TDagGate.matrix()`, `IGate.matrix()`
  • New sampling feature is available in the numpy backend. This feature may effective for mid-circuit measurement.
  • Circuit JSON scheme is updated due to experimental features.
blueqat 0.4.8 - 2021-10-150.4.8
gyu-dongyu-don·4y ago·October 15, 2021
GitHub

📋 Changes

  • Builtin-macros
  • `mcx_with_ancilla(ctrl: list[int], target: int, ancilla: int) -> Circuit`
  • `mcz_with_ancilla(ctrl: list[int], target: int, ancilla: int) -> Circuit`
  • Remove wq module
  • We recommend using dwave-ocean-sdk library for annealing task.
  • `wq.pauli` function (It translates QUBO to pauli matrix for QAOA) is moved to `pauli.to_qubo` function.
  • Internal implementation of Circuit
  • It cheats type-checker likes pyright for suppressing errors.
blueqat 0.4.7 - 2021-09-160.4.7
gyu-dongyu-don·4y ago·September 16, 2021
GitHub

📋 Changes

  • Built-in macros.
  • To activate, run `import blueqat.macros`.
  • `draw`, `margolus`, `c3z`, `c4z`, `c3x`, `c4x`, `mcx_gray`, `mcz_gray`, `mcrx_gray`, `mcry_gray`, `mcrz_gray`, `mcr_gray`, `mcu_gray` are available.
  • `blueqat.utils.circuit_to_unitary` is moved to `blueqat.circuit_utils.circuit_to_unitary`.
blueqat 0.4.6 - 2021-07-290.4.6
gyu-dongyu-don·4y ago·July 29, 2021
GitHub

📋 Changes

  • Add JSON serializer/deserializer. Refer [here](https://blueqat.readthedocs.io/en/latest/json.html).
  • `Operation.create` method is added. All subclasses of `Operation` class must implement it.
  • Remove circuit-local default backend, move `blueqat.circuit.GATE_SET` to `blueqat.gateset.GATE_SET`.
  • Use `GATE_SET` directly is not recommended. Please use `blueqat.gateset.create` or `blueqat.gateset.get_op_type`.
  • u1/u2/u3, cu1/cu2/cu3 gates are completely deleted.
blueqat 0.4.5 - 2021-06-220.4.5
gyu-dongyu-don·4y ago·June 22, 2021
GitHub

📋 Changes

  • Add the following methods. These methods are equivalent with `Circuit.run()` with `returns="..."` arguments, but these are typed.
  • `Circuit.statevector() -> np.ndarray`
  • `Circuit.shots(n: int) -> Counter`
  • `Circuit.oneshot() -> Tuple[np.ndarray, str]`
Blueqat 0.4.40.4.4
gyu-dongyu-don·5y ago·June 10, 2021
GitHub

📋 Changes

  • Repair 1 qubit gate decomposition function
  • Correct gamma factor of `U.matrix()`
Blueqat 0.4.30.4.3
gyu-dongyu-don·5y ago·May 21, 2021
GitHub

📋 Changes

  • Add `ryrz_decomposer`
  • Debug wq (Ising model) module
  • Debug phase/cphase gate matrix
Blueqat 0.4.20.4.2
gyu-dongyu-don·5y ago·March 26, 2021
GitHub

📋 Changes

  • U1(θ) → RZ(θ)
  • U2(φ, λ) → U(π/2, φ, λ, -0.5 * (φ+λ))
  • U3(θ, φ, λ) → U(θ, φ, λ, -0.5 * (φ+λ))
  • CU1(θ) → CR(θ)
  • CU2(φ, λ) → CU(π/2, φ, λ, -0.5 * (φ+λ))
  • CU3(θ, φ, λ) → CU(θ, φ, λ, -0.5 * (φ+λ))
Blueqat 0.4.10.4.1
gyu-dongyu-don·5y ago·March 10, 2021
GitHub

📋 Changes

  • Input initial statevector for numpy and numba backend. #101
  • Cache is not stored after running. If caching is required, use `circuit.run(save_cache=True)`.
  • Correct qgate backend, SWAP gate error.
Blueqat 0.4.00.4.0
gyu-dongyu-don·5y ago·March 2, 2021
GitHub

📋 Changes

  • Make mat1 gate and basic transpiler. It will facilitate circuit optimizations and execution on the real quantum machine
  • Add ZZ gate, this is for trapped-ion based machine's basis gate
  • Update for next version of qgate (thank you, Morino san!)
  • CCZ gate was not available. Now, it is available.
Blueqat 0.3.180.3.18
gyu-dongyu-don·5y ago·August 13, 2020
GitHub

📋 Changes

  • Add `reset` operation. This is equivalent with measurement without recording measured result and apply X gate when 1 is measured.
  • Correct numba's global phase error.
  • `opt` module is renamed to `wq`.
Blueqat 0.3.170.3.17
gyu-dongyu-don·6y ago·June 2, 2020
GitHub

📋 Changes

  • Improve speed for Pauli operator's `to_matrix()` method
  • Add `n_qubits` property for Pauli operator term and expr.
  • Correct pauli.Term.simplify method
  • Solve the problem that constant value of `max_n` raises exception

📦 Random generated Hamiltonian

  • Making CSC (sparse) matrix from random generated Hamiltonian.
  • row: The number of qubits
  • column: The number of terms
  • cell: Time (sec.)

📦 Blueqat 0.3.16 (Previous release)

  • ![Screenshot_20200602_132935](https://user-images.githubusercontent.com/13610313/83479867-cbf3dc80-a4d4-11ea-8bba-d18d47d09200.png)

📦 Blueqat 0.3.17 (This release)

  • ![Screenshot_20200602_133045](https://user-images.githubusercontent.com/13610313/83479946-f6de3080-a4d4-11ea-85af-c6191e95a772.png)

📦 Compare

  • Time in v0.3.16 / Time in v0.3.17
  • Greater than 1: v0.3.17 is faster than v0.3.16
  • Less than 1: v 0.3.17 is slower than v0.3.16
  • ![Screenshot_20200602_133207](https://user-images.githubusercontent.com/13610313/83480008-25f4a200-a4d5-11ea-9cd8-e367afae5290.png)
  • For large Hamiltonian, this release is 100 times faster than previous release

📦 LiH Hamiltonian

  • Compared with OpenFermion's `qubit_operator_sparse`.
  • Normally, the number of qubits is 12, but can be add redundant qubit via n_qubits parameter.
  • Measure 12 qubits to 19 qubits.
  • ![Screenshot_20200602_133715](https://user-images.githubusercontent.com/13610313/83480350-0ca02580-a4d6-11ea-8f18-ce54a07af9f4.png)
  • (*1): Due to lack of memory, so many swap out occurred. Blueqat implementation is less memory consumption than OpenFermion.
  • New install
  • `pip install blueqat`
  • Update
  • + 1 more
Blueqat 0.3.160.3.16
gyu-dongyu-don·6y ago·May 20, 2020
GitHub

📦 `Vqe()` class

  • When sampler is default, make sparse matrix and calculate expectation directly.
  • This is for performance improvement.
  • (If you're using default sampler, your VQE code is speed-up without any changes.)
  • VQE is still under refactoring process and this API may be changed in future release, however, because this feature is very important, I want to merge this feature in the master.
  • Many cases of VQEs, this change makes fantastic speed-ups.
  • However, some cases, this change makes slow down.
  • To make previous default behaviour, specify sampler as previous default sampler.
  • ```py
  • + 4 more

📦 `pauli.to_matrix()` qubit order is reordered.

  • Previous: X[0] * Y[1] is X ⊗ Y
  • New: X[0] * Y[1] is Y ⊗ X
  • New behavior is equivalent with Blueqat circuit's statevector order.
Blueqat 0.3.150.3.15
gyu-dongyu-don·6y ago·May 20, 2020
GitHub

📦 `Vqe()` class

  • When sampler is default, make sparse matrix and calculate expectation directly.
  • This is for performance improvement.
  • (If you're using default sampler, your VQE code is speed-up without any changes.)
  • VQE is still under refactoring process and this API may be changed in future release, however, because this feature is very important, I want to merge this feature in the master.
  • Many cases of VQEs, this change makes fantastic speed-ups.
  • However, some cases, this change makes slow down.
  • To make previous default behaviour, specify sampler as previous default sampler.
  • ```py
  • + 4 more
Blueqat 0.3.140.3.14
gyu-dongyu-don·6y ago·May 12, 2020
GitHub

Features

  • Add new gates, rxx, ryy, rzz, cswap.
  • Add `Circuit.dagger`. `Circuit().rx(0.1)[0].cx[0, 1].t[0].dagger()` is `Circuit().tdg[0].cx[0, 1].rx(-0.1)[0]`.
  • Add `mixer` argument for QaoaAnsatz. (This feature may be changed in the future.) This is for Quantum Alternative Operator Ansatz.
  • Add `sparse` option for `pauli.Expr.to_unitary`. It returns scipy's sparse matrix. `(X[0] + Y[3]).to_matrix(sparse='csc') # csc matrix` The performance for larger qubits expr is better than (default's) dense matrix, but still not fast.

📦 Experimental

  • Add `blueqat.experimental.utils.circuit_to_unitary`. It returns unitary matrix instead of statevector.
  • Blueqat already has to_unitary method for sympy's unitary gate.
  • However, this function runs the circuit with a backend which returns statevector.
  • This feature is useful for debugging the circuit, and it's too heavy for larger circuit.

📦 Install

  • New install
  • `pip install blueqat`
  • Update
  • `pip install -U blueqat`
Blueqat 0.3.130.3.13
gyu-dongyu-don·6y ago·January 28, 2020
GitHub

🐛 Bug Fix

  • To avoiding qgate 0.2.1 bug, Blueqat had implementation of workaround.
  • However, Blueqat workaround has bug.
  • Now, bug fixed version qgate 0.2.2 was released.
  • So, workaround was removed. It works well!

📦 Experimental

  • Experimental feature is available in "blueqat.experimental" module.
  • This is unstable features. It may modified or deleted.

📦 Install

  • New install
  • `pip install blueqat`
  • Update
  • `pip install -U blueqat`
Blueqat 0.3.120.3.12
gyu-dongyu-don·6y ago·January 20, 2020
GitHub

📦 Circuit repr

  • `Circuit.__repr__` method is implemented.
  • Now, `Circuit` is printable.
  • ```py
  • c = Circuit().x[0].rz(1.2)[1]
  • c.cx[0, 1]
  • print(c)
  • ```

📦 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]):
  • ```
  • + 32 more

📦 numba backend

  • Correct bugs in controlled gate of numba backend

📦 Install

  • New install
  • `pip install blueqat`
  • Update
  • `pip install -U blueqat`
Blueqat 0.3.110.3.11
gyu-dongyu-don·6y ago·January 14, 2020
GitHub

📦 Enhance IBM Q backend "returns" option

  • Add some `Circuit().run_with_ibmq(returns=...)` options:
  • `shots`: (default) Returns measurement result
  • `_exception`: If error occurs during importing qiskit, returns exception. otherwise, returns `None`.
  • `draw`: (NEW): Draw the circuit via Qiskit QuantumCircuit.draw
  • `qiskit_circuit`: (NEW): Returns Qiskit QuantumCircuit object
  • `qiskit_job`: (NEW): Returns Qiskit Job object
  • `qiskit_result`: (NEW) Returns Qiskit Result object
  • Usage of draw option
  • + 5 more

📦 Adjust global phase

  • Adjust global phase for some gates.

Add gates

  • Add cy (controlled-y), ch (controlled-h), phase, cphase gates.
  • phase gate is as same as rz gate except global phase.
  • rz:
  • [ e^-iθ/2, 0]
  • [0, e^iθ/2]
  • phase:
  • [1, 0]
  • [0, e^iθ]
  • + 12 more

📦 numba backend

  • Correct bugs in cnot gate and cz gate of numba backend

📦 Install

  • New install
  • `pip install blueqat`
  • Update
  • `pip install -U blueqat`
Blueqat 0.3.100.3.10
gyu-dongyu-don·6y ago·September 19, 2019
GitHub

📦 `ignore_global` option for numpy and numba backend.

  • Blueqat ignores global phase of statevectors.
  • But it makes debugging difficult.
  • We added `ignore_global` option to disable ignoring global phase.
  • `Circuit().x[0].phase(0.123)[0].run()`
  • => `array([0.+0.j, 1.+0.j])` Global phase is ignored.
  • `Circuit().x[0].phase(0.123)[0].run(ignore_global=False)`
  • => `array([0. +0.j , 0.99244503+0.12269009j])` Global phase is not ignored.
  • Related to this change, we will modify global phases for some gates in future release.

Modify IBMQ backend for new qiskit

  • Modify for `qiskit~=0.11.1`

📦 Modify scipy requirements version

  • Now, required scipy version is `scipy>1.1.0`

📦 Install

  • New install
  • `pip install blueqat`
  • Update
  • `pip install -U blueqat`
Blueqat 0.3.90.3.9
gyu-dongyu-don·6y ago·August 2, 2019
GitHub

New features

  • Implemented Controlled-RX, RY, RZ.

📦 Install

  • New install
  • `pip install blueqat`
  • Update
  • `pip install -U blueqat`
Blueqat 0.3.80.3.8
gyu-dongyu-don·6y ago·July 29, 2019
GitHub

qgate backend (Thanks to Morino san): New backend for [qgate](https://github.com/shinmorino/qgate).

  • qgate is required for this backend.
  • Usage: `Circuit().h[:10].run(backend='qgate', shots=1000)` or `Circuit().h[:10].run(backend='qgate', runtime='cuda', shots=1000)`

numba backend: New backend using numba.

  • Usage: `Circuit().h[:10].run(backend='numba')`

Add test for other backends

  • To add backend, run `python -m pytest ./test --add-backend numba --add-backend qgate`.

🐛 Small modifications and debugging

  • `pip install blueqat`