Skip to content

webnexus-uk/NodeJS-quantum-simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NodeJS-quantum-simulator - Quantum Simulator for NodeJS

NodeJS-quantum-simulator is an experimental quantum computing simulator for the NodeJS. This code was adapted from dakk's qc64

Creating a Bell State in NodeJS

Features

  • Simulate operations of various quantum gates including Pauli-X, Pauli-Y, Pauli-Z, Hadamard, CNOT, and SWAP on a two-qubit system.

How it works

Starting from the initial state |00>, the simulator can apply various quantum gates to manipulate the state of the two-qubit system. This allows for the simulation of various quantum computing concepts!

Gate Sequences and Outputs

The simulator supports various gate sequences, and the measurement results will vary based on the gate sequence used. Here are some examples:

Example 1

Gate Sequence: x0,x1,y0,y1,z0,z1,h0,h1,cx,sw

Measurement Results:

Quantum State Measurement Count Output
00 5 QQQQQ
01 0
10 0
11 23 QQQQQQQQQQQQQQQQQQQQQ

Example 2

Gate Sequence: h0,h1,h0,h1,h0,h1

Measurement Results:

Quantum State Measurement Count Output
00 14 QQQQQQQQQQQQQ
01 0
10 0
11 14 QQQQQQQQQQQQQ

Contributions

Contributions to NodeJS-quantum-simulator are welcome! Feel free to create a pull request or open an issue if you have ideas for improvements or spot any bugs.

License

NodeJS-quantum-simulator is released under MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published