Skip to main content
Pourya Bagheri
Quantum Computing | Blockchain Soloution | MERN
View all authors

Docker cli cheat sheet

· 3 min read
Pourya Bagheri
Quantum Computing | Blockchain Soloution | MERN

Docker cli cheat sheet

Displays the installed version of Docker.

docker --version

Shows system-wide information about Docker including the number of containers, images, and more.

docker info

Pulls a Docker image from Docker Hub or another registry.

docker pull <image_name>

Builds an image from a Dockerfile located in the specified directory.

docker build -t <tag_name> <path>

Lists all available Docker images on your local machine.

docker images

Lists all running containers.

docker ps

Lists all containers, including stopped ones.

docker ps -a

Runs a container from the specified image.

docker run <image_name>

Runs a container in detached mode.

docker run -d <image_name>

Maps a port on the host machine to a port in the container.

docker run -p <host_port>:<container_port> <image_name>

Executes a command inside a running container.

docker exec -it <container_id> <command>

Stops a running container.

docker stop <container_id>

Starts a stopped container.

docker start <container_id>

Restarts a running or stopped container.

docker restart <container_id>

Removes a stopped container.

docker rm <container_id>

Removes a Docker image.

docker rmi <image_id>

Fetches logs of a running or stopped container.

docker logs <container_id>

Lists all Docker networks.

docker network ls

Lists all Docker volumes.

docker volume ls

Starts up all containers defined in the docker-compose.yml file.

docker-compose up

Stops and removes all containers defined in the docker-compose.yml file.

docker-compose down

Builds images for the services defined in the docker-compose.yml file.

docker-compose build

Fetches logs for all containers defined in the docker-compose.yml file.

docker-compose logs

Lists files inside a running container.

docker exec <container_id> ls

Lists all Docker images, including intermediate layers.

docker images -a

Builds an image without using cache, ensuring all steps are re-executed.

docker build --no-cache -t <tag_name> .

Retrieves detailed information about a container or image.

docker inspect <container_id>

Opens an interactive bash shell inside a running container.

docker exec -it <container_id> bash

Customizes the output of the docker info command.

docker info --format '{{.Containers}}'

Attaches to a running container's standard input, output, and error streams.

docker attach <container_id>

Displays live statistics of running containers.

docker stats

Pulls all tags of a Docker image.

docker pull --all-tags <image_name>

Tags an image with a new name.

docker tag <image_id> <new_image_name>

Copies files or directories from a container to the host.

docker cp <container_id>:<container_path> <host_path>

Copies files or directories from the host to a container.

docker cp <host_path> <container_id>:<container_path>

Automatically removes the container when it stops.

docker run --rm <image_name>

Logs in to a Docker registry.

docker login <registry_url>

Logs out from a Docker registry.

docker logout

Removes unused Docker objects like containers, networks, and volumes.

docker prune

Retrieves detailed information about a Docker network.

docker network inspect <network_name>

Dynamic circuits enable circuit cutting for quantum supercomputing

· 2 min read
Pourya Bagheri
Quantum Computing | Blockchain Soloution | MERN

The research paper published in Nature discusses a significant step forward in quantum computing, specifically focusing on how two connected quantum processors can work together to execute a quantum circuit that is too large for either processor to handle on its own. This breakthrough is important because it marks the first demonstration of using multiple quantum processors in tandem, a concept that could help scale quantum computing for larger, more complex problems.

alt text Reference: Source of the image

Currently, most classical supercomputers are built by connecting many CPUs and GPUs together to solve big problems. The researchers suggest that quantum computers of the future will follow a similar approach, using multiple quantum processing units (QPUs) working together. This is part of a larger vision of Quantum-Centric Supercomputing (QCSC), where quantum processors and classical computers work side by side to tackle computational tasks.

alt text Reference: Source of the image

To enable this, the researchers used a technique called "circuit cutting," which allows a large quantum circuit to be divided into smaller pieces that can be handled by individual QPUs. They then used classical computers to combine the results of these sub-circuits. The main challenge here is performing two-qubit operations (which are fundamental to quantum computing) between qubits located on different processors. The team developed a method using "virtual gates" and a process called teleportation to simulate entanglement between qubits on separate processors, which made it possible to perform these operations across two QPUs.

The researchers also tackled the issue of errors that occur when quantum processors "idle" during the process. They created an innovative error mitigation strategy, improving the accuracy of the quantum calculations. This is crucial because even small errors can significantly impact the results of quantum computations.

alt text Reference: Source of the image

One of the main outcomes of this research is that it extends the capabilities of quantum hardware beyond the limitations of single processors. For example, the team was able to simulate a quantum state with 142 qubits using two 127-qubit processors. This is an important advancement for future quantum computing applications, such as simulating natural systems or improving quantum error correction techniques.

alt text Reference: Source of the image

Ultimately, this research shows that even with current quantum processors, it’s possible to explore larger, more complex problems, and it paves the way for future breakthroughs in quantum computing and supercomputing.