ubsuny / CP1-24-HW1

Homework template for CP1 in 2024
1 stars 15 forks source link

Urgently need additions to quantumcode.py #98

Open SchrodingersStruggle opened 3 hours ago

SchrodingersStruggle commented 3 hours ago

Hello, on the quantumcode file I can see that it's currently pretty unfinished, and I wanted to make sure somebody is working on it.

If you reference https://learning.quantum.ibm.com/tutorial/chsh-inequality you'll see that we do not have the portion of the code where we receive the expectation values from a quantum computer, nor do we have the code which plots the final output.

These seem like some pretty important additions with respect to the final grade we will all receive, as task completion matters.

Whoever's working on it, can you verify, and if nobody is can somebody who needs a pull request take that task?

ojha-aditya commented 2 hours ago

I can have a look at it.

SchrodingersStruggle commented 2 hours ago

@ojha-aditya Alright, let me know if you end up wanting this task so I can close the issue

HeshamElsaman commented 2 hours ago

I was trying to work on it, but I'm still trying to work on other issues. Maybe I can join Aditya in finishing it or follow up on his work if it's okay.

SchrodingersStruggle commented 2 hours ago

Okay, for now I will assign you two this task, but I won't close the issue until further update

ojha-aditya commented 54 minutes ago

Works! @HeshamElsaman maybe you could put here what were you trying to build, I can then start from there and keep you updated

ojha-aditya commented 2 minutes ago

Creating a Jupyter notebook for the quantumcode.py file.

One peculiar thing is that using python 3.12 somehow does not support importing numpy

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], <a href='vscode-notebook-cell:?execution_count=1&line=2'>line 2</a>
      <a href='vscode-notebook-cell:?execution_count=1&line=1'>1</a> # Addressing the 'FIX: QuantumCircuit referenced but never defined' from quantumcode.py
----> <a href='vscode-notebook-cell:?execution_count=1&line=2'>2</a> import numpy as np
      <a href='vscode-notebook-cell:?execution_count=1&line=4'>4</a> # Qiskit imports
      <a href='vscode-notebook-cell:?execution_count=1&line=5'>5</a> from qiskit import QuantumCircuit

ModuleNotFoundError: No module named 'numpy'

referencing #45 regarding that and sticking to python 3.9 for now