# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

from logicqubit.logic import *

# +
logicQuBit = LogicQuBit(2, symbolic=True, first_left=False)

q1 = Qubit()
q2 = Qubit()

logicQuBit.PrintState()

# +
q1.H()
q2.CX(q1)

logicQuBit.PrintState()
# -

logicQuBit.setSymbolValuesForAll(1, 0) # a=1, b=0

logicQuBit.PlotDensityMatrix()

res = logicQuBit.Measure([q1,q2])
logicQuBit.Plot()



StarcoderdataJupyterScriptsDedupFiltered