Skip to content

Experimental features

Takumi Kato edited this page Apr 13, 2020 · 9 revisions

experimental.Ops

Branch: master

Release: 0.3.13

Immutable operations.

from blueqat import Circuit
from blueqat.experimental import Ops
c = Circuit().x[0]
d = Ops().x[0]

c2 = c.z[0]
d2 = d.z[0]

print(c) # => Circuit(1).x[0].z[0]
print(d) # => Ops(1).x[0]

experimental.utils

Branch: master

Release: None

  • circuit_to_unitary

Make (numpy) unitary matrix from Circuit object. It's very heavy operation when n_qubits is not small.

experimental.macros

Branch: experimental-macros

Release: None

  • Add some new macros
  • Decorator for register_macro
from blueqat.experimental.macros import def_macro

@def_macro
def foo(c, arg):
    pass

# is equivalent with

def foo(c, arg):
    pass
BlueqatGlobalSetting.register_macro('foo', foo)
  • Circuit local macro

experimental.vqe

Branch: vqe-experimental

Release: None

Enhanced blueqat.vqe module. It will replace current blueqat.vqe module.

Planned features:

  • Picklabel objective function for multiprocessing.
  • Better Hamiltonian separation strategy.
    • Simple Hamiltonian separation strategy.
  • Refactoring for giving additional information (likes molecular data) to optimizer.
  • Improvement performance of probability calculation from statevector.
    • Sampler and expect function will be merged after refactoring.
  • Sampler with run options likes backend selection.
    • Sampler and expect function will be merged after refactoring.
  • Sampler & expect calculator interface.

experimental.pauli

Branch: vqe-experimental

Release: None

Modifications accompanied with vqe module.

  • Picklable time evolution object
  • Controlled time evolution
  • Use typing.NamedTuple
  • Change algorithm for is_commutable
  • Add function to get pauli string
  • Add function to trim small terms