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

Uploaded Source

Built Distribution

QiskitExtension-0.1.0.dev3-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: QiskitExtension-0.1.0.dev3.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.dev3.tar.gz
Algorithm Hash digest
SHA256 9bee902341c7d9eaedc24babf191642ddbd8be79acf9d7423ce75b7f6f38638f
MD5 e60ee92ee1b41717ed751c7681ddc0cd
BLAKE2b-256 f26c26191fadc00f6b7a9b5c8ca15cdf42586d602cd25568c2cd9cd93e2da788

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for QiskitExtension-0.1.0.dev3-py3-none-any.whl
Algorithm Hash digest
SHA256 0c6b75b67bde9f31dbbd56391836f1fd7d5fbfd8c813a76299f8ff28f99ad424
MD5 f43de7484f8532bcb53e19e7f4dab510
BLAKE2b-256 7e22c7a045c9b77369e63417d2b2e8dc18868f42d62383503854290e211017a7

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