Skip to content

chiragfalor/Cartesi-Quantum-on-Blockchain

 
 

Repository files navigation

Cartesi submission for HackBoston

Build the docker image for Cartesi Virtual Machine (in host mode). Install the requirements by running the following commands

cd quantumblockchain
python3 -m venv .env
. .env/bin/activate
pip install -r requirements.txt
ROLLUP_HTTP_SERVER_URL="http://127.0.0.1:5004" python3 qbc.py

Then, one uses frontend to send inputs. In a new terminal entire

cd frontend-console

Inputs are of the form {"gate":"H", "target":1}

If one wants to create Bell pair in the first two bits

yarn start input send --payload '{"gate":"H", "target":1}'
yarn start input send --payload '{"gate":"CX", "target":0, "control":1}'

If one wants to teleport the entangled first qubit to fourth position

yarn start input send --payload '{"gate":"TEL",  "target":0, "control":3}'

We can perform arbitrary complicated quantum computations and finally Measure all. This would run the complete circuit on a quantum machine and return the output of our final computation.

yarn start input send --payload '{"gate":"MeasAll"}'

At each gate, the logger logs a TextImage of the circuit to keep track of the computations.

About

Cartesi Rollups Examples

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.4%
  • Python 9.6%
  • HCL 2.7%
  • JavaScript 1.1%
  • Other 1.2%