Cqc

Latest version: v3.2.3

Safety actively analyzes 683530 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

3.2.2

-------------------
- Security patch: require twisted 20.3 or higher

3.2.1

-------------------
- Fixed bug when releasing qubits.

3.2.0

-------------------
- Major refactoring of `cqc.pythonLib` which splits the code into multiple files and improved extendability by the use of abstract classes etc.

3.1.2

-------------------
- Allow for numpy version up to 2.0.0

3.1.1

-------------------
- Pending messages are now flushed when a connection is closed.

3.1.0

-------------------
- CQC now supports logic. That is one can send a batch of CQC-instructions to the backend which can have conditional logic based on measurement results.
Note, that this is different from having logic in the application in the Python library since this requires communcation back and fourth from the backend to the application.
The Python library is also updated to be able to construct these instructions.
For examople:
- to apply instructions a certain number of times you can now do:
python
from cqc.pythonLib import CQCConnection, qubit, CQCMix

with CQCConnection('Alice') as node:

qubit is created beforehand
qbit = qubit(node)

Start of the CQCMix
with CQCMix(node) as pgrm:
qbit.X()

Start of the Factory
Apply H three times
with pgrm.loop(times=3):
qbit.H()

Y gate which is not part of
the loop (i.e. Factory) above
qbit.Y()

- or to perform certain instructions based on a measurement outcome you can do:
python
from cqc.pythonLib import CQCConnection, qubit, CQCMix

with CQCConnection('Alice') as node:

qubits are created beforehand
qbit1 = qubit(node)
qbit2 = qubit(node)

Start of the CQCMix
with CQCMix(node) as pgrm:

result = qbit1.measure()

if measurement yielded 1, apply X
with pgrm.cqc_if(result == 1):
qbit2.X()

else, apply H
with pgrm.cqc_else():
qbit2.H()

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.