Skip to main content

A Qiskit visualization extension

Project description

Qiskit visualization extension

A simple qiskit extension with more visualization function.

Installation

  git clone --depth 1 https://github.com/Slope86/QiskitExtension
  cd QiskitExtension
  pip install .

Configuration

the configuration file for this extension is located at ~/qiskit_extension/config/config.ini

; Setting up the ket notation for the state vector,
; e.g. |0>, |1>, |+>, |->, |i>, |j> (|j> = |-i>),
; can change to other notation if needed. (only accept char)
[ket]
z0 = 0
z1 = 1
x0 = +
x1 = -
y0 = i
y1 = j

Usage/Examples

A simple example to create a EPR pair:

  from qiskit_extension.quantum_circuit2 import QuantumCircuit2 as qc2
  from qiskit_extension.state_vector2 import StateVector2 as sv2

  # create the circuit for creating EPR pair
  circuit_EPR = qc2(2)
  circuit_EPR.h(0)
  circuit_EPR.cx(0, 1)

  # create a ground state
  state00 = sv2.from_label('00')

  # evolve the state with the circuit
  state_EPR = state00.evolve(circuit_EPR)

  # visualize the state
  state_EPR.show_state() #|00> + |11>

More examples can be found in the examples folder.

Requirement

Python >= 3.10
qiskit[visualization] >= 0.22.3

License

The QiskitExtension project is open source under the MIT license. However, the extensions that are installed separately are not part of the QiskitExtension project. They all have their own licenses!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

QiskitExtension-0.1.0.dev2.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

QiskitExtension-0.1.0.dev2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file QiskitExtension-0.1.0.dev2.tar.gz.

File metadata

  • Download URL: QiskitExtension-0.1.0.dev2.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for QiskitExtension-0.1.0.dev2.tar.gz
Algorithm Hash digest
SHA256 6f2904f8162d2d65c1312c69398d414b853a976b6478dc6a22fc6f8c47ea1bc4
MD5 19c7e9faf231e5b7402ab3ee2d9947b3
BLAKE2b-256 f6dde3fad9fa201e69f7f33fda3038508d14f5c16fd1a1a344f8f0c4a7528b08

See more details on using hashes here.

File details

Details for the file QiskitExtension-0.1.0.dev2-py3-none-any.whl.

File metadata

File hashes

Hashes for QiskitExtension-0.1.0.dev2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea42e413961aa11058b252935a989667af4c22ad26d36cd40597187b2d412c82
MD5 ee35a70e198c14fe010defdc99365883
BLAKE2b-256 19200a7c0da3cd8d53f5c868c581a5aa39e71e760e32e3c414bd023c7e2b89bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page