devcodinglab.com · lab notebook

Coding Notes & Technical References

A personal collection of programming notes, code snippets, and setup guides across Quantum Computing, Android, C++, Java, and Web development.

from qiskit import QuantumCircuit
from qiskit_aer import AerSimulator

qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0, 1], [0, 1])

job = AerSimulator().run(qc, shots=1024)
counts = job.result().get_counts()
print(counts)  # {'00': ~512, '11': ~512}
Qiskit · 2-qubit Bell state entanglement
import pennylane as qml

dev = qml.device("default.qubit", wires=2)

@qml.qnode(dev)
def bell_probs():
    qml.Hadamard(wires=0)
    qml.CNOT(wires=[0, 1])
    return qml.probs(wires=[0, 1])

print(bell_probs())  # [0.5, 0., 0., 0.5]
PennyLane · QNode probability measurement
class TaskViewModel(private val dao: TaskDao) : ViewModel() {
    val tasks = dao.observeAll()

    fun insertTask(title: String) {
        viewModelScope.launch {
            dao.insert(TaskEntity(title = title))
        }
    }
}
Android · Room DAO with ViewModel coroutine scope
void bfs(int start, const vector<vector<int>>& adj) {
    vector<bool> vis(adj.size(), false);
    queue<int> q;
    vis[start] = true; q.push(start);
    while (!q.empty()) {
        int u = q.front(); q.pop();
        for (int v : adj[u]) if (!vis[v]) {
            vis[v] = true; q.push(v);
        }
    }
}
C++ · Iterative breadth-first traversal

Topics Covered

Core subjects, languages, and frameworks documented in this notebook.

All posts →

Quantum Computing

Circuits & Sim

Quantum gates, entanglement circuits, parameterized QNodes, and tensor-network simulations using Qiskit, PennyLane, and TensorCircuit.

Android & Kotlin

7 notes

Practical Android guides covering RecyclerView, Room CRUD, Fragments, BroadcastReceivers, Started Services, and SharedPreferences.

C++

Core Lang

Pointers, memory management, object-oriented fundamentals, STL containers, and standard data structures & algorithm notes.

Java

Core Lang

Core Java syntax, object-oriented patterns, Collections Framework, concurrency basics, and Android Java examples.

HTML, CSS & JS

1 note

Foundational web structure, CSS layout rules, DOM scripting, and JavaScript basics for building clean browser interfaces.

Databases, Mobile & Tools

6 notes

PostgreSQL & Supabase schema notes, Expo cross-platform builds, Xcode Cloud CI/CD, and Git authentication fixes.

Dev Coding Lab — Personal coding notes and technical references.