Skip to content

mistkit extends the python3 based qiskit quantum computing language state_drawer function with a misty state output possibility.

License

Notifications You must be signed in to change notification settings

elmbeech/mistkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mistkit {▾▴✦◇▮▭■●}

Abstract:

In the book "Q is for quantum", Terry Rudolph describes a formalism with white balls (|0>) and black balls (|1>), termed misty state, to teach quantum theory and quantum computing to folks with only a basic knowledge of arithmetic.

This formalism was for teaching adapted and further developed, amongst others, by Adrian German, Edwin Barnes, Marcelo Pias, Qiao Xiang, and Sophia Economou.

For quantum computing, International Business Machines developed Qiskit, a popular, Python based, free and open-source software stack.

All what Mistkit does is adding to Qiskit's state_drawer function the possibility to output Statevectors in misty state formalism, alongside the already available Statevectors output formats (text, latex, latex_source, qsphere, hinton, bloch, city, paulivec).

Header:

HowTo Guide:

  1. Install or update to the latest mistkit version:
pip install -U mistkit
  1. Load mistkit:
import mistkit
  1. Run minimal example:
# load libraries
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector
import pylatex
import mistkit

# generate 8[qubit] quantum circuit
qc = QuantumCircuit(8)
qc.x([0,1,3,5,6,7])  # state 0b11101011
qc.draw()

# read out the quantum circuit state vector
sv = Statevector.from_instruction(qc)
print(sv.data)  # numpy state vector array.
print(sv.draw('mist'))  # state vector in Terry Rudolph's misty state notation.
sv.draw('latex')  # state vector in Paul Dirac's ket notation.
  1. Uninstall mistkit:
pip uninstall mistkit

Refernce Manual:

  1. Read the docstrings:
import mistkit
from qiskit import visualization

help(mistkit.state_to_mist)
help(visualization.state_visualization.state_drawer)
help(mistkit.mystify)

Tutorial:

  1. man/misty_bell_states.ipynb

Discussion:

To be developed.

About Documentation:

Within the mistkit library, we tried to stick to the documentation policy laid out by Daniele Procida in his "what nobody tells you about documentation" talk at PyCon 2017 in Portland, Oregon.

Cite:

@Misc{bucher2024,
  author    = {Bucher, Elmar},
  title     = {elmbeech/mistkit: python3 based qiskit quantum computing language state_drawer function misty state output extension.},
  year      = {2024},
  copyright = {Open Access},
  doi       = {10.5281/zenodo.13972868}
  publisher = {Zenodo},
}

Road Map:

  • ~

Release Note:

  • version 0.1.1 ok implementation.
  • version 0.0.0 miskit rises from the ashes.

All we know is falling.

About

mistkit extends the python3 based qiskit quantum computing language state_drawer function with a misty state output possibility.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages