Skip to main content

A natural language interface for quantum programming using Qiskit.

Project description

Zeeq: Quantum Natural Language Interpreter

Zeeq is a natural language-based interface for designing, simulating, and running quantum circuits using Cirq. It enables users to interact with quantum programming through intuitive English commands, making quantum computing accessible to everyone—from beginners to experienced developers.


Features and Commands

Zeeq supports a comprehensive range of commands for creating and manipulating quantum circuits. These commands are organized into intuitive categories for easy use.


1. Create a Circuit

  • Command:
    • Create a circuit with [number] qubits
  • Description: Initializes a quantum circuit with the specified number of qubits.
  • Example:
    • Create a circuit with 3 qubits

2. Apply Quantum Gates

Zeeq allows the application of quantum gates to specific qubits. Below is the list of supported gates:

Gate Command Description Example
H Apply Hadamard gate to qubit [n] Creates a superposition state for the specified qubit. Apply Hadamard gate to qubit 0
X Apply X gate to qubit [n] Flips the state of the specified qubit (quantum NOT gate). Apply X gate to qubit 1
Y Apply Y gate to qubit [n] Applies a Pauli-Y operation, flipping the qubit with a phase. Apply Y gate to qubit 2
Z Apply Z gate to qubit [n] Applies a phase flip to the qubit. Apply Z gate to qubit 0
RX Apply RX gate [angle] to qubit [n] Rotates the qubit around the X-axis by the specified angle (in radians). Apply RX gate 1.57 to qubit 0
RY Apply RY gate [angle] to qubit [n] Rotates the qubit around the Y-axis by the specified angle (in radians). Apply RY gate 3.14 to qubit 1
RZ Apply RZ gate [angle] to qubit [n] Rotates the qubit around the Z-axis by the specified angle (in radians). Apply RZ gate 1.0 to qubit 2
SWAP Apply SWAP gate between qubit [n] and qubit [m] Swaps the states of the two specified qubits. Apply SWAP gate between qubit 1 and qubit 2
CNOT Apply CNOT gate from qubit [control] to qubit [target] Creates entanglement between two qubits using a controlled NOT gate. Apply CNOT gate from qubit 0 to qubit 1
CZ Apply CZ gate from qubit [control] to qubit [target] Applies a controlled-Z gate between two qubits. Apply CZ gate from qubit 0 to qubit 1
Toffoli Apply Toffoli gate to qubits [control1], [control2], and [target] Applies a controlled-controlled NOT gate (Toffoli gate). Apply Toffoli gate to qubits 0, 1, and 2

3. Measure Qubits

  • Command:
    • Measure all qubits
    • Measure qubit [n]
  • Description: Measures all or specific qubits and maps their states to classical bits.
  • Example:
    • Measure all qubits
    • Measure qubit 0

4. Reset Qubits

  • Command:
    • Reset all qubits
    • Reset qubit [n]
  • Description: Resets all or specific qubits to the ( |0\rangle ) state.
  • Example:
    • Reset all qubits
    • Reset qubit 1

5. Add Barriers

  • Command:
    • Add barrier to all qubits
    • Add barrier to qubits [n, m, ...]
  • Description: Adds barriers to separate operations visually or logically. (Simulated using comments in Cirq.)
  • Example:
    • Add barrier to all qubits
    • Add barrier to qubits 0 and 1

6. Display Circuit

  • Command: Display the circuit
  • Description: Outputs an ASCII representation of the current quantum circuit.
  • Example:
    • Display the circuit

7. Export Circuit

  • Command: Export the circuit to file [filename]
  • Description: Exports the quantum circuit to a file (e.g., JSON or Python) for external use.
  • Example:
    • Export the circuit to file circuit.json

8. Run the Circuit

  • Command: Run the circuit [number] times
  • Description: Executes the quantum circuit on a simulator and returns the result.
  • Example:
    • Run the circuit 1000 times

9. Visualize Bloch Sphere

  • Command: Draw Bloch sphere for qubit [n]
  • Description: Visualizes the quantum state of a specific qubit on the Bloch sphere (requires visualization libraries).
  • Example:
    • Draw Bloch sphere for qubit 0

Example Workflow

Create a circuit with 3 qubits  
Apply Hadamard gate to qubit 0  
Apply CNOT gate from qubit 0 to qubit 1  
Apply RX gate 1.57 to qubit 2  
Measure all qubits  
Run the circuit 1000 times  
Display the circuit  
Export the circuit to file example.json  

Why Use Zeeq?

  1. Simplifies Quantum Programming: Users can create and manipulate quantum circuits in plain English.
  2. Intuitive Commands: No need to learn Cirq syntax or quantum theory to get started.
  3. Versatile: Supports various quantum gates and operations for different applications.
  4. Beginner-Friendly: Designed for educational and professional use cases alike.

Zeeq bridges the gap between natural language and quantum programming, now leveraging Cirq for efficient quantum computing simulations!

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

zeeq-1.1.2.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zeeq-1.1.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file zeeq-1.1.2.tar.gz.

File metadata

  • Download URL: zeeq-1.1.2.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for zeeq-1.1.2.tar.gz
Algorithm Hash digest
SHA256 898c47dffa89f0bba8b6f5cdd57cb5ff23a5753e7bc0fe32a29f70334fa7f235
MD5 d90b83f43536c8496b8ae28293b723b8
BLAKE2b-256 69168698db8b5c8d96405954efbbec1bb1e64531f357ec47de3e72c2eafa1c3f

See more details on using hashes here.

File details

Details for the file zeeq-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: zeeq-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for zeeq-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 369eecb43223b79e426d7fcea514326637d540df88e01eed91240ff84915e556
MD5 df18f89f506cf30e2d71836f1a613d9b
BLAKE2b-256 54c6dc5787ad2f0110030410ae1f10ca1c4ccde18ea4fe3db194d7971de408e6

See more details on using hashes here.

Supported by

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