ubsuny / CP1-24-HW1

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

Is there any particular language/package we should use? #13

Open iglesias-cardinale opened 2 days ago

iglesias-cardinale commented 2 days ago

Python has a couple of great quantum packages, particularly Qiskit, which I think will be useful for this.

Qiskit (once imported) allows us to do things like initialize a quantum circuit in a single line. Something like circuit = qk.QuantumCircuit(2, 2) which would initialize a quantum circuit with two qubits and two classical bits. We can similarly implement the gates within the circuit with single lines of code. circuit.h(0) would apply a Hadamard gate to the first qubit in the circuit, for instance.

I'm just not sure if there's any particular package/language that we should prioritize, but I know that qiskit is really popular and widely used for this sort of thing, so I figure that will be most useful for most people. What do you guys think?

laserlab commented 2 days ago

Yes, this will be in python and the most reasonable approach to interface with IBM quantum is qiskit. Have a look at #5 comments for a link.

laserlab commented 2 days ago

Please add a milestone and a label to this issue

laserlab commented 2 days ago

@iglesias-cardinale Can you write up some sample code with a description for qiskit and open a pull request? That can be part of your homework task.

avgagliardo commented 2 days ago

Python has a couple of great quantum packages, particularly Qiskit, which I think will be useful for this.

Qiskit (once imported) allows us to do things like initialize a quantum circuit in a single line. Something like circuit = qk.QuantumCircuit(2, 2) which would initialize a quantum circuit with two qubits and two classical bits. We can similarly implement the gates within the circuit with single lines of code. circuit.h(0) would apply a Hadamard gate to the first qubit in the circuit, for instance.

I'm just not sure if there's any particular package/language that we should prioritize, but I know that qiskit is really popular and widely used for this sort of thing, so I figure that will be most useful for most people. What do you guys think?

Qiskit and Cirq are the two python packages that I'm aware of, but I've heard that Cirq is a little more oriented towards Google's quantum computing system rather than IBM's.

OpenQASM is kind of cool, and the IBM composer autogenerates it, but an assembly language might be a little too low level if we want to use object orientation in our approach.

So far I've been liking what I see with Qiskit. It seems pretty pythonic, which makes it a lot easier to use if you already enjoy using python.