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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: QiskitExtension-0.1.0.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.tar.gz
Algorithm Hash digest
SHA256 da27fa0c54a5ba0df3fef37e6f483f5fd5a4f1fbf65a8e04213ce64d96bd12d3
MD5 a5138519f8ffc1cbb4dd069867ae2d03
BLAKE2b-256 e6ddaaf3c7cbae6f8666506d8aeb4420d349fe5fe66195ce25d12da34ffd6365

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for QiskitExtension-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2813e49ce22190dd888ab70a5811ed9a41143c92343087346439750cb114fbf
MD5 2c616b5426874e3808f9acde6d728117
BLAKE2b-256 edb4b20ae50df8d1e8f1dc23d81faa8386054681c8af731c30f6994549455e25

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