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.dev1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: QiskitExtension-0.1.0.dev1.tar.gz
  • Upload date:
  • Size: 15.2 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.dev1.tar.gz
Algorithm Hash digest
SHA256 4d2fbf1c42191ff98de2ab03198532757c425e494f2479e4f6dc9e661cebe8db
MD5 c5079c4146e07bb8ff598edcef48995e
BLAKE2b-256 43b223feeb85ce80f7fe1e60c1d1afd129afb319cc62a91875639c83afbd4a0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for QiskitExtension-0.1.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 f21f6b7871a46a88fbbb2d2ff16bab8e82d97c72c2196ba0b464735b850c9af4
MD5 876ab99699eecfd418f12382e415a35a
BLAKE2b-256 699500289eb9900421d2cc8cba41dab2d1df0112f0050b725d9eaf5e847263b5

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