Qiskit open-source SDK for working with quantum computers

https://news.ycombinator.com/rss Hits: 8
Summary

Qiskit Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives. This library is the core component of Qiskit, which contains the building blocks for creating and working with quantum circuits, quantum operators, and primitive functions (Sampler and Estimator). It also contains a transpiler that supports optimizing quantum circuits, and a quantum information toolbox for creating advanced operators. For more details on how to use Qiskit, refer to the documentation located here: https://quantum.cloud.ibm.com/docs/ Installation We encourage installing Qiskit via pip : pip install qiskit Pip will handle all dependencies automatically and you will always install the latest (and well-tested) version. To install from source, follow the instructions in the documentation. Create your first quantum program in Qiskit Now that Qiskit is installed, it's time to begin working with Qiskit. The essential parts of a quantum program are: Define and build a quantum circuit that represents the quantum state Define the classical output by measurements or a set of observable operators Depending on the output, use the Sampler primitive to sample outcomes or the Estimator primitive to estimate expectation values. Create an example quantum circuit using the QuantumCircuit class: import numpy as np from qiskit import QuantumCircuit # 1. A quantum circuit for preparing the quantum state |000> + i |111> / √2 qc = QuantumCircuit ( 3 ) qc . h ( 0 ) # generate superposition qc . p ( np . pi / 2 , 0 ) # add quantum phase qc . cx ( 0 , 1 ) # 0th-qubit-Controlled-NOT gate on 1st qubit qc . cx ( 0 , 2 ) # 0th-qubit-Controlled-NOT gate on 2nd qubit This simple example creates an entangled state known as a GHZ state $(|000\rangle + i|111\rangle)/\sqrt{2}$ . It uses the standard quantum gates: Hadamard gate ( h ), Phase gate ( p ), and CNOT gate ( cx ). Once you've made your first quantum circuit, choose which primitive you will...

First seen: 2025-11-26 14:30

Last seen: 2025-11-26 21:32